npcx/fan: Avoid turning on disabled fans
Fan enable state is controlled in common/fan.c. This patch prevents
npcx fan driver from enabling it.
BRANCH=none
TEST=Verify no 'Fan 0 stalled' is printed in S3 and S5. Verify the
fan spins in S0.
@@ -346,8 +346,11 @@ void fan_tick_func(void)
/* Make sure rpm mode is enabled */
if (p_status->fan_mode != TACHO_FAN_RPM) {
p_status->auto_status = FAN_STATUS_STOPPED;
+ /* Why isn't this 'continue'? */
return;
}
+ if (!fan_get_enabled(ch))
+ continue;
/* Get actual rpm */
p_status->rpm_actual = mft_fan_rpm(ch);
/* Do smart fan stuff */
