summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAnshul Jain <anshulj@nvidia.com>2012-11-30 06:42:42 -0500
committerNicolin Chen <nicolinc@nvidia.com>2017-08-14 21:38:52 -0400
commit7b3c2f179e9a4847e834e79b45b69ffdf429fd14 (patch)
tree4b143513e50d09e53687887861624f27cbac3c7a /include/linux
parent5429460bed4b231e0755682366d98a5b9c2d8b26 (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.h16
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
24struct therm_est_subdevice { 26struct 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
45struct 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
52struct 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 */