diff options
| author | Hyungwoo Yang <hyungwooy@nvidia.com> | 2014-11-25 18:08:54 -0500 |
|---|---|---|
| committer | Nicolin Chen <nicolinc@nvidia.com> | 2017-08-14 21:38:52 -0400 |
| commit | dd6e683e308d39fc697cd58e854fdcd13100e57c (patch) | |
| tree | 82c79fce645c34a21c81baeb8efa5abfbabf38a6 /include/linux | |
| parent | 303ebe41f25ac9f2e1aa1c5d1c6d0ac76d59adbd (diff) | |
tegra: therm_est: support multiple sets of coefficients
Edit original commit to use 'thermal_zone_of_device_ops'.
enable multlple sets of coefficients.
Bug 1582735
(cherry-picked from commit If0c31037fdf1d8004c9ee241e0387ceef1bb022f)
Signed-off-by: Hyungwoo Yang <hyungwooy@nvidia.com>
Reviewed-on: http://git-master/r/655573
Change-Id: If8ec11e80238f70227d473891076a04a8cd1301d
Signed-off-by: Srikar Srimath Tirumala <srikars@nvidia.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/therm_est.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/include/linux/therm_est.h b/include/linux/therm_est.h index 9630bd046..a67739483 100644 --- a/include/linux/therm_est.h +++ b/include/linux/therm_est.h | |||
| @@ -26,13 +26,25 @@ | |||
| 26 | #define MAX_ACTIVE_STATES 10 | 26 | #define MAX_ACTIVE_STATES 10 |
| 27 | #define MAX_TIMER_TRIPS 10 | 27 | #define MAX_TIMER_TRIPS 10 |
| 28 | 28 | ||
| 29 | struct therm_est_subdevice { | 29 | struct therm_est_sub_thz { |
| 30 | void *dev_data; | 30 | struct thermal_zone_device *thz; |
| 31 | struct thermal_zone_device *sub_thz; | ||
| 32 | long coeffs[HIST_LEN]; | ||
| 33 | long hist[HIST_LEN]; | 31 | long hist[HIST_LEN]; |
| 34 | }; | 32 | }; |
| 35 | 33 | ||
| 34 | struct therm_est_coeffs { | ||
| 35 | long toffset; | ||
| 36 | long (*coeffs)[HIST_LEN]; | ||
| 37 | }; | ||
| 38 | |||
| 39 | struct therm_est_subdevice { | ||
| 40 | struct therm_est_sub_thz *sub_thz; | ||
| 41 | struct therm_est_coeffs *coeffs_set; | ||
| 42 | int num_devs; | ||
| 43 | int num_coeffs; | ||
| 44 | int active_coeffs; | ||
| 45 | int ntemp; | ||
| 46 | }; | ||
| 47 | |||
| 36 | /* | 48 | /* |
| 37 | * Timer trip provides a way to change trip temp dynamically based on timestamp | 49 | * Timer trip provides a way to change trip temp dynamically based on timestamp |
| 38 | * when the trip is enabled. | 50 | * when the trip is enabled. |
| @@ -74,13 +86,11 @@ struct therm_est_data { | |||
| 74 | 86 | ||
| 75 | /* zone parameters */ | 87 | /* zone parameters */ |
| 76 | struct thermal_zone_params *tzp; | 88 | struct thermal_zone_params *tzp; |
| 77 | long toffset; | ||
| 78 | long polling_period; | 89 | long polling_period; |
| 79 | int passive_delay; | 90 | int passive_delay; |
| 80 | int tc1; | 91 | int tc1; |
| 81 | int tc2; | 92 | int tc2; |
| 82 | int ndevs; | 93 | struct therm_est_subdevice subdevice; |
| 83 | struct therm_est_subdevice *devs; | ||
| 84 | int use_activator; | 94 | int use_activator; |
| 85 | }; | 95 | }; |
| 86 | 96 | ||
