mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
Prevent issuing warning when fan is off
LM4 reports fan stalled when fan speed is set to 0. Need to check this before issuing warning. Signed-off-by: Vic Yang <victoryang@chromium.org> BUG=chrome-os-partner:7497 TEST=Did not see fan stall warning when fan speed is 0. Change-Id: I8eecca8516b5442d4943d9195d04acc5b4041085
This commit is contained in:
@@ -132,7 +132,8 @@ static void update_lpc_mapped_memory(void)
|
||||
|
||||
static void check_fan_failure(void)
|
||||
{
|
||||
if ((LM4_FAN_FANCTL & (1 << FAN_CH_CPU)) &&
|
||||
if (pwm_get_fan_target_rpm() != 0 &&
|
||||
(LM4_FAN_FANCTL & (1 << FAN_CH_CPU)) &&
|
||||
((LM4_FAN_FANSTS >> (2 * FAN_CH_CPU)) & 0x03) == 0) {
|
||||
/* Fan enabled but stalled. Issues warning.
|
||||
* As we have thermal shutdown protection, issuing warning
|
||||
|
||||
Reference in New Issue
Block a user