diff options
| author | Anshul Jain <anshulj@nvidia.com> | 2012-11-30 06:42:42 -0500 |
|---|---|---|
| committer | Nicolin Chen <nicolinc@nvidia.com> | 2017-08-14 21:38:52 -0400 |
| commit | 7b3c2f179e9a4847e834e79b45b69ffdf429fd14 (patch) | |
| tree | 4b143513e50d09e53687887861624f27cbac3c7a /include/linux | |
| parent | 5429460bed4b231e0755682366d98a5b9c2d8b26 (diff) | |
drivers: misc: fan thermal estimator driver
Thermal estimator driver that estimates temperature based on
a linear formula from other temperature sensors
This estimated thermal point is used to drive fan
Change-Id: Ic6f82473435901514bca47cfda7a453ab64468e0
Signed-off-by: Anshul Jain <anshulj@nvidia.com>
Reviewed-on: http://git-master/r/167700
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/therm_est.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/therm_est.h b/include/linux/therm_est.h index 0a900ef22..29bdf8ba6 100644 --- a/include/linux/therm_est.h +++ b/include/linux/therm_est.h | |||
| @@ -21,6 +21,8 @@ | |||
| 21 | 21 | ||
| 22 | #define HIST_LEN (20) | 22 | #define HIST_LEN (20) |
| 23 | 23 | ||
| 24 | #define MAX_ACTIVE_STATES 10 | ||
| 25 | |||
| 24 | struct therm_est_subdevice { | 26 | struct therm_est_subdevice { |
| 25 | void *dev_data; | 27 | void *dev_data; |
| 26 | int (*get_temp)(void *, long *); | 28 | int (*get_temp)(void *, long *); |
| @@ -40,4 +42,18 @@ struct therm_est_data { | |||
| 40 | struct therm_est_subdevice devs[]; | 42 | struct therm_est_subdevice devs[]; |
| 41 | }; | 43 | }; |
| 42 | 44 | ||
| 45 | struct therm_fan_est_subdevice { | ||
| 46 | void *dev_data; | ||
| 47 | int (*get_temp)(void *, long *); | ||
| 48 | long coeffs[HIST_LEN]; | ||
| 49 | long hist[HIST_LEN]; | ||
| 50 | }; | ||
| 51 | |||
| 52 | struct therm_fan_est_data { | ||
| 53 | long toffset; | ||
| 54 | long polling_period; | ||
| 55 | int ndevs; | ||
| 56 | int active_trip_temps[MAX_ACTIVE_STATES]; | ||
| 57 | struct therm_fan_est_subdevice devs[]; | ||
| 58 | }; | ||
| 43 | #endif /* _LINUX_THERM_EST_H */ | 59 | #endif /* _LINUX_THERM_EST_H */ |
