diff options
author | Joshua Primero <jprimero@nvidia.com> | 2011-10-13 14:42:56 -0700 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2011-12-08 17:03:24 +0530 |
commit | aa5203999e22df96a3722a70759053cd35c4d9d6 (patch) | |
tree | 7e06b4b567184058597c8481c79b84beb3f69e58 /include/linux/nct1008.h | |
parent | e93fee7719a78f60a1e9fe48d29cd325b723ee67 (diff) |
drivers: nct1008: Generic therm funcs to nct1008
Preparing nct1008 for refactoring overhaul. Added
generic functions which will be used by Tegra thermal
module.
Reviewed-on: http://git-master/r/57952
Reviewed-on: http://git-master/r/63337
cherry-picked from 2d5e2369511fb49f1895938fea935b12d72c4827
Change-Id: Ia850db408f533318db4b634e6f29b68c1ad8a1de
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/66549
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Diffstat (limited to 'include/linux/nct1008.h')
-rw-r--r-- | include/linux/nct1008.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/nct1008.h b/include/linux/nct1008.h index 40519883fc5e..8e4b4bcc83b2 100644 --- a/include/linux/nct1008.h +++ b/include/linux/nct1008.h @@ -29,6 +29,8 @@ #define MAX_ZONES 16 +struct nct1008_data; + struct nct1008_platform_data { bool supported_hwrev; bool ext_range; @@ -41,6 +43,38 @@ struct nct1008_platform_data { s8 thermal_zones[MAX_ZONES]; u8 thermal_zones_sz; void (*alarm_fn)(bool raised); + void (*probe_callback)(struct nct1008_data *); +}; + +struct nct1008_data { + struct work_struct work; + struct i2c_client *client; + struct nct1008_platform_data plat_data; + struct mutex mutex; + struct dentry *dent; + u8 config; + s8 *limits; + u8 limits_sz; + void (*alarm_fn)(bool raised); + struct regulator *nct_reg; +#ifdef CONFIG_TEGRA_THERMAL_SYSFS + struct thermal_zone_device *thz; +#endif + long current_lo_limit; + long current_hi_limit; + + long shutdown_temp; + void (*alert_func)(void *); + void *alert_data; }; +int nct1008_thermal_get_temp(struct nct1008_data *data, long *temp); +int nct1008_thermal_set_limits(struct nct1008_data *data, + long lo_limit_milli, + long hi_limit_milli); +int nct1008_thermal_set_alert(struct nct1008_data *data, + void (*alert_func)(void *), + void *alert_data); +int nct1008_thermal_set_shutdown_temp(struct nct1008_data *data, + long shutdown_temp); #endif /* _LINUX_NCT1008_H */ |