diff options
author | Joshua Primero <jprimero@nvidia.com> | 2012-08-23 16:34:34 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 12:32:45 -0700 |
commit | e590e26fefbabf7b3699dcde9be5c3f788fb7c53 (patch) | |
tree | 25b9033a5308945a26cb3fb19b8a78a6e9a9ddf2 /include/linux/therm_est.h | |
parent | f946fa1b72f44f7041033298757a7a21cb2e7b30 (diff) |
drivers: misc: therm_est: Refactored therm_est
1) Registered therm_est as a platform driver.
2) Driver now registers with linux thermal framework
on it's own.
3) Allow the driver to connect with one passive cooling
device
Change-Id: If37ad1c142a9be0dee3e844b3ffb435cfebeaf01
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/127671
GVS: Gerrit_Virtual_Submit
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Rebase-Id: R7ce0260f91187598f6f84ee23ffeb0b44fbc1927
Diffstat (limited to 'include/linux/therm_est.h')
-rw-r--r-- | include/linux/therm_est.h | 50 |
1 files changed, 8 insertions, 42 deletions
diff --git a/include/linux/therm_est.h b/include/linux/therm_est.h index 035b08fa9813..0a900ef2266d 100644 --- a/include/linux/therm_est.h +++ b/include/linux/therm_est.h @@ -28,50 +28,16 @@ struct therm_est_subdevice { long hist[HIST_LEN]; }; -struct therm_estimator { - long therm_est_lo_limit; - long therm_est_hi_limit; - void (*callback)(void *); - void *callback_data; - long cur_temp; - long polling_period; - struct workqueue_struct *workqueue; - struct delayed_work therm_est_work; +struct therm_est_data { long toffset; - int ntemp; + long polling_period; + struct thermal_cooling_device *cdev; + long trip_temp; + int tc1; + int tc2; + int passive_delay; int ndevs; - struct therm_est_subdevice **devs; + struct therm_est_subdevice devs[]; }; -#ifdef CONFIG_THERM_EST -struct therm_estimator *therm_est_register( - struct therm_est_subdevice **devs, - int ndevs, - long toffset, - long pperiod); -int therm_est_get_temp(struct therm_estimator *est, long *temp); -int therm_est_set_limits(struct therm_estimator *est, - long lo_limit, - long hi_limit); -int therm_est_set_alert(struct therm_estimator *est, - void (*cb)(void *), - void *cb_data); -#else -static inline struct therm_estimator *therm_est_register( - struct therm_est_subdevice **devs, - int ndevs, - long toffset, - long pperiod) -{ return NULL; } -static inline int therm_est_get_temp(struct therm_estimator *est, long *temp) -{ return -EINVAL; } -static inline int therm_est_set_limits(struct therm_estimator *est, - long lo_limit, - long hi_limit) -{ return -EINVAL; } -static inline int therm_est_set_alert(struct therm_estimator *est, - void (*cb)(void *), - void *cb_data) -{ return -EINVAL; } -#endif #endif /* _LINUX_THERM_EST_H */ |