Skip to content

Commit 87d4c9b

Browse files
authored
lotus: fan, fix fan stuck on min speed (#933)
Fan to fan variation means some fans will be below the start rpm slightly. And will never exit startup behavior. Add margin to startup speed of 200rpm Signed-off-by: Kieran Levin <ktl@frame.work>
1 parent c8c65da commit 87d4c9b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • zephyr/program/lotus/lotus/src

zephyr/program/lotus/lotus/src/fan.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ enum fan_status board_override_fan_control_duty(int ch)
5252
* signal to EC after EC outputs the PWM signal to the fan.
5353
* During this period, the driver will read two consecutive RPM = 0.
5454
* In this case, don't step the PWM duty too aggressively.
55+
* We subtract 200 from the start RPM as margin.
5556
*/
56-
if (data->rpm_pre < 1000 && rpm_actual < 1000) {
57+
if (rpm_actual < (fans[ch].rpm->rpm_min - 200)) {
5758
fan_set_duty(ch, CONFIG_FAN_START_DUTY);
5859
return FAN_STATUS_CHANGING;
5960
}

0 commit comments

Comments
 (0)