Loading drivers/regulator/cpr-regulator.c +10 −4 Original line number Diff line number Diff line Loading @@ -5166,10 +5166,16 @@ static void tsens_threshold_notify(struct therm_threshold *tsens_cb_data) break; } if (tsens_cb_data->cur_state != tsens_cb_data->trip_triggered) { rc = sensor_mgr_set_threshold(tsens_cb_data->sensor_id, tsens_cb_data->threshold); if (rc < 0) cpr_err(cpr_vreg, "Failed to set temp. threshold, rc=%d\n", rc); cpr_err(cpr_vreg, "Failed to set temp. threshold, rc=%d\n", rc); else tsens_cb_data->cur_state = tsens_cb_data->trip_triggered; } } static int cpr_check_tsens(struct cpr_regulator *cpr_vreg) Loading drivers/thermal/msm_thermal.c +20 −5 Original line number Diff line number Diff line Loading @@ -2694,8 +2694,12 @@ static void vdd_mx_notify(struct therm_threshold *trig_thresh) pr_err("Failed to remove vdd mx restriction\n"); } mutex_unlock(&vdd_mx_mutex); if (trig_thresh->cur_state != trig_thresh->trip_triggered) { sensor_mgr_set_threshold(trig_thresh->sensor_id, trig_thresh->threshold); trig_thresh->cur_state = trig_thresh->trip_triggered; } } static void msm_thermal_bite(int zone_id, long temp) Loading Loading @@ -4064,8 +4068,11 @@ static void cx_phase_ctrl_notify(struct therm_threshold *trig_thresh) cx_phase_unlock_exit: mutex_unlock(&cx_mutex); cx_phase_ctrl_exit: if (trig_thresh->cur_state != trig_thresh->trip_triggered) { sensor_mgr_set_threshold(trig_thresh->sensor_id, trig_thresh->threshold); trig_thresh->cur_state = trig_thresh->trip_triggered; } return; } Loading Loading @@ -4193,8 +4200,11 @@ static void vdd_restriction_notify(struct therm_threshold *trig_thresh) unlock_and_exit: mutex_unlock(&vdd_rstr_mutex); set_and_exit: if (trig_thresh->cur_state != trig_thresh->trip_triggered) { sensor_mgr_set_threshold(trig_thresh->sensor_id, trig_thresh->threshold); trig_thresh->cur_state = trig_thresh->trip_triggered; } return; } Loading Loading @@ -4242,8 +4252,11 @@ static void ocr_notify(struct therm_threshold *trig_thresh) unlock_and_exit: mutex_unlock(&ocr_mutex); set_and_exit: if (trig_thresh->cur_state != trig_thresh->trip_triggered) { sensor_mgr_set_threshold(trig_thresh->sensor_id, trig_thresh->threshold); trig_thresh->cur_state = trig_thresh->trip_triggered; } return; } Loading Loading @@ -4478,6 +4491,7 @@ int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, thresh_ptr[i].notify = callback; thresh_ptr[i].trip_triggered = -1; thresh_ptr[i].parent = thresh_inp; thresh_ptr[i].cur_state = -1; thresh_ptr[i].threshold[0].temp = high_temp * tsens_scaling_factor; thresh_ptr[i].threshold[0].trip = Loading @@ -4498,6 +4512,7 @@ int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, thresh_ptr->notify = callback; thresh_ptr->trip_triggered = -1; thresh_ptr->parent = thresh_inp; thresh_ptr->cur_state = -1; thresh_ptr->threshold[0].temp = high_temp * tsens_scaling_factor; thresh_ptr->threshold[0].trip = THERMAL_TRIP_CONFIGURABLE_HI; Loading include/linux/msm_thermal.h +2 −1 Original line number Diff line number Diff line /* * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -91,6 +91,7 @@ struct therm_threshold { int32_t trip_triggered; void (*notify)(struct therm_threshold *); struct threshold_info *parent; int32_t cur_state; }; struct threshold_info { Loading Loading
drivers/regulator/cpr-regulator.c +10 −4 Original line number Diff line number Diff line Loading @@ -5166,10 +5166,16 @@ static void tsens_threshold_notify(struct therm_threshold *tsens_cb_data) break; } if (tsens_cb_data->cur_state != tsens_cb_data->trip_triggered) { rc = sensor_mgr_set_threshold(tsens_cb_data->sensor_id, tsens_cb_data->threshold); if (rc < 0) cpr_err(cpr_vreg, "Failed to set temp. threshold, rc=%d\n", rc); cpr_err(cpr_vreg, "Failed to set temp. threshold, rc=%d\n", rc); else tsens_cb_data->cur_state = tsens_cb_data->trip_triggered; } } static int cpr_check_tsens(struct cpr_regulator *cpr_vreg) Loading
drivers/thermal/msm_thermal.c +20 −5 Original line number Diff line number Diff line Loading @@ -2694,8 +2694,12 @@ static void vdd_mx_notify(struct therm_threshold *trig_thresh) pr_err("Failed to remove vdd mx restriction\n"); } mutex_unlock(&vdd_mx_mutex); if (trig_thresh->cur_state != trig_thresh->trip_triggered) { sensor_mgr_set_threshold(trig_thresh->sensor_id, trig_thresh->threshold); trig_thresh->cur_state = trig_thresh->trip_triggered; } } static void msm_thermal_bite(int zone_id, long temp) Loading Loading @@ -4064,8 +4068,11 @@ static void cx_phase_ctrl_notify(struct therm_threshold *trig_thresh) cx_phase_unlock_exit: mutex_unlock(&cx_mutex); cx_phase_ctrl_exit: if (trig_thresh->cur_state != trig_thresh->trip_triggered) { sensor_mgr_set_threshold(trig_thresh->sensor_id, trig_thresh->threshold); trig_thresh->cur_state = trig_thresh->trip_triggered; } return; } Loading Loading @@ -4193,8 +4200,11 @@ static void vdd_restriction_notify(struct therm_threshold *trig_thresh) unlock_and_exit: mutex_unlock(&vdd_rstr_mutex); set_and_exit: if (trig_thresh->cur_state != trig_thresh->trip_triggered) { sensor_mgr_set_threshold(trig_thresh->sensor_id, trig_thresh->threshold); trig_thresh->cur_state = trig_thresh->trip_triggered; } return; } Loading Loading @@ -4242,8 +4252,11 @@ static void ocr_notify(struct therm_threshold *trig_thresh) unlock_and_exit: mutex_unlock(&ocr_mutex); set_and_exit: if (trig_thresh->cur_state != trig_thresh->trip_triggered) { sensor_mgr_set_threshold(trig_thresh->sensor_id, trig_thresh->threshold); trig_thresh->cur_state = trig_thresh->trip_triggered; } return; } Loading Loading @@ -4478,6 +4491,7 @@ int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, thresh_ptr[i].notify = callback; thresh_ptr[i].trip_triggered = -1; thresh_ptr[i].parent = thresh_inp; thresh_ptr[i].cur_state = -1; thresh_ptr[i].threshold[0].temp = high_temp * tsens_scaling_factor; thresh_ptr[i].threshold[0].trip = Loading @@ -4498,6 +4512,7 @@ int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, thresh_ptr->notify = callback; thresh_ptr->trip_triggered = -1; thresh_ptr->parent = thresh_inp; thresh_ptr->cur_state = -1; thresh_ptr->threshold[0].temp = high_temp * tsens_scaling_factor; thresh_ptr->threshold[0].trip = THERMAL_TRIP_CONFIGURABLE_HI; Loading
include/linux/msm_thermal.h +2 −1 Original line number Diff line number Diff line /* * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -91,6 +91,7 @@ struct therm_threshold { int32_t trip_triggered; void (*notify)(struct therm_threshold *); struct threshold_info *parent; int32_t cur_state; }; struct threshold_info { Loading