diff options
author | Jean Huang <jeanh@nvidia.com> | 2013-04-23 12:28:59 -0700 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2013-04-25 17:47:07 -0700 |
commit | 71082aec6dd1ab636ae67eb9415f1309a110c3b3 (patch) | |
tree | 3652fce9c51c6b74b69347101bf9a9facd35b9f6 /drivers/thermal | |
parent | 65e0b90df3d17ae6d97234f61d1a4b4624d88feb (diff) |
arm: tegra: fan: clear next fan state before suspend
Original design was to restore fan to the state before suspend,
but fan-thermal detection should work itself to decide fan state after resume.
Bug 1273984
Change-Id: Ieac7688ed2ccf3dca3427c61e3d51a209cda79a3
Signed-off-by: Jean Huang <jeanh@nvidia.com>
Reviewed-on: http://git-master/r/222157
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Anshul Jain (SW) <anshulj@nvidia.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/pwm_fan.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/thermal/pwm_fan.c b/drivers/thermal/pwm_fan.c index df736557b627..ef1e69906985 100644 --- a/drivers/thermal/pwm_fan.c +++ b/drivers/thermal/pwm_fan.c @@ -777,6 +777,7 @@ static int pwm_fan_suspend(struct platform_device *pdev, pm_message_t state) cancel_delayed_work(&fan_data->fan_ramp_work); /*Turn the fan off*/ fan_data->fan_cur_pwm = 0; + fan_data->next_target_pwm = 0; set_pwm_duty_cycle(0, fan_data); /*Stop thermal control*/ @@ -795,10 +796,7 @@ static int pwm_fan_resume(struct platform_device *pdev) /*Start thermal control*/ fan_data->fan_temp_control_flag = 1; - if (fan_data->next_target_pwm != fan_data->fan_cur_pwm) - queue_delayed_work(fan_data->workqueue, - &fan_data->fan_ramp_work, - msecs_to_jiffies(fan_data->step_time)); + mutex_unlock(&fan_data->fan_state_lock); return 0; } |