From 7b3c2f179e9a4847e834e79b45b69ffdf429fd14 Mon Sep 17 00:00:00 2001 From: Anshul Jain Date: Fri, 30 Nov 2012 03:42:42 -0800 Subject: 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 Reviewed-on: http://git-master/r/167700 --- include/linux/therm_est.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/linux') 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 @@ #define HIST_LEN (20) +#define MAX_ACTIVE_STATES 10 + struct therm_est_subdevice { void *dev_data; int (*get_temp)(void *, long *); @@ -40,4 +42,18 @@ struct therm_est_data { struct therm_est_subdevice devs[]; }; +struct therm_fan_est_subdevice { + void *dev_data; + int (*get_temp)(void *, long *); + long coeffs[HIST_LEN]; + long hist[HIST_LEN]; +}; + +struct therm_fan_est_data { + long toffset; + long polling_period; + int ndevs; + int active_trip_temps[MAX_ACTIVE_STATES]; + struct therm_fan_est_subdevice devs[]; +}; #endif /* _LINUX_THERM_EST_H */ -- cgit v1.2.2