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>
}
if (est->current_trip_index != (trip_index - 1)) {
- est->current_trip_index = trip_index - 1;
- if (!((trip_index - 1) % 2))
+ if (!((trip_index - 1) % 2) || (!est->current_trip_index))
thermal_zone_device_update(est->thz);
+ est->current_trip_index = trip_index - 1;
}
est->ntemp++;
if (!est)
return -EINVAL;
+ est->current_trip_index = 0;
cancel_delayed_work(&est->therm_fan_est_work);
return 0;
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*/
/*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;
}