Skip to content

Commit 8fe0304

Browse files
LeoCX-TsaiJohnAZoidberg
authored andcommitted
fwk: marigold: Fix fan off hysteresis
the apu_temp read is change at Commit 3e4255f but fan off hysteresis not change the to new variable(apu_filtered_temp) BRANCH=fwk-marigold-22606 BUG=https://app.clickup.com/t/86eqtcdxq TEST=test on marigold, open thermallog check fan off will delay off 5sec. Signed-off-by: LeoCX_Tsai <[email protected]>
1 parent 7a0638b commit 8fe0304

File tree

1 file changed

+2
-4
lines changed
  • zephyr/program/framework/marigold/src

1 file changed

+2
-4
lines changed

zephyr/program/framework/marigold/src/thermal.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ bool log_thermal;
120120
void board_override_fan_control(int fan, int *temp)
121121
{
122122
int actual_rpm, new_rpm;
123-
int apu_temp_mk = 0;
124123

125124
int apu_pct = 0;
126125
int pct = 0;
@@ -151,7 +150,6 @@ void board_override_fan_control(int fan, int *temp)
151150
if (fan == 0) {
152151
thermal_filter_update(&apu_filtered, temp[TEMP_APU]);
153152
}
154-
/*f75303_get_val_mk(TEMP_CPU_F, &apu_temp_mk); */
155153

156154
apu_filtered_temp = thermal_filter_get(&apu_filtered);
157155

@@ -188,8 +186,8 @@ void board_override_fan_control(int fan, int *temp)
188186
* unless the system has cooled 0.5C below the fan turn on temperature
189187
*/
190188
if (thermal_params[TEMP_APU].temp_fan_off &&
191-
apu_temp_mk > (thermal_params[TEMP_APU].temp_fan_off
192-
* 1000 - 500)) {
189+
C_TO_K(apu_filtered_temp)*1000 >
190+
(thermal_params[TEMP_APU].temp_fan_off * 1000 - 500)) {
193191
deadline.val = get_time().val + FAN_STOP_DELAY_S;
194192
}
195193
if (!timestamp_expired(deadline, &now))

0 commit comments

Comments
 (0)