Skip to content

Commit 7661088

Browse files
LeoCX-Tsaiquinchou77
authored andcommitted
fwk: azalea: re-apply fan duty before fan check to avoid false
Manually add PR #1791 to azalea branch. Commit: da46d46 During S0 entry, project_diagnostics() schedules two deferred hooks: start_fan_deferred at +500 ms (sets fan duty to 30%) check_device_deferred at +2000 ms (verifies fan RPM > 100) However, a platform reset occurs between these two events. The reset causes the fan rpm to be < 100, so when the check device runs, the fan is no longer spinning, and the RPM reading falls below 100. This incorrectly triggers the DIAGNOSTICS_NOFAN flag even though the fan is functional. Workaround: On each platform reset, re-apply 30% fan duty only if device diagnostics have not completed. BRANCH=fwk-sunflower-26784 BUG=https://app.clickup.com/t/86eva61n1 TEST=1. Set Boot Performance Mode = Max Battery then save and exit. 2. Shutdown the system then press power button to power on. 3. Did not show fan not present Signed-off-by: LeoCX_Tsai <LeoCX_Tsai@compal.com>
1 parent bdc3c69 commit 7661088

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

zephyr/program/framework/azalea/src/project_diagnostics.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@
2626

2727
void start_fan_deferred(void)
2828
{
29+
if (is_device_complete())
30+
return;
2931
/* force turn on the fan for diagnostic */
3032
dptf_set_fan_duty_target(20);
3133
}
3234
DECLARE_DEFERRED(start_fan_deferred);
35+
DECLARE_HOOK(HOOK_CHIPSET_RESET, start_fan_deferred, HOOK_PRIO_DEFAULT);
3336

3437
void check_device_deferred(void)
3538
{

0 commit comments

Comments
 (0)