diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2013-01-09 16:36:16 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2013-01-09 16:36:16 +0100 |
commit | 4aa5a91d37aad0f186f0e5b4863340c7d640d083 (patch) | |
tree | e28ef0b6948ebfb6a3956fd60eeb1c43622a3a5e /drivers/hwmon | |
parent | 65119fd57aeb0b52bfb30d19c052256f8fb08e6e (diff) |
hwmon: lm95245: add local temp and remote critical shutdown temp hooks
In order to allow tighter integration with external thermal throttling
code add local temperature and remote critical shutdown temperature
hooks. Rename the existing hooks for clarity.
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/lm95245.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/hwmon/lm95245.c b/drivers/hwmon/lm95245.c index 24e50f5c157c..cea5048b1ba7 100644 --- a/drivers/hwmon/lm95245.c +++ b/drivers/hwmon/lm95245.c @@ -254,11 +254,17 @@ void thermal_get_temp(struct device *dev, int *temp, int index) data->regs[index + OFFSET_LOW_UNSIGNED]); } -void lm95245_thermal_get_temp(struct device *dev, int *temp) +void lm95245_get_local_temp(struct device *dev, int *temp) +{ + thermal_get_temp(dev, temp, INDEX_LOCAL_TEMP); +} +EXPORT_SYMBOL(lm95245_get_local_temp); + +void lm95245_get_remote_temp(struct device *dev, int *temp) { thermal_get_temp(dev, temp, INDEX_REMOTE_TEMP); } -EXPORT_SYMBOL(lm95245_thermal_get_temp); +EXPORT_SYMBOL(lm95245_get_remote_temp); static ssize_t show_input(struct device *dev, struct device_attribute *attr, char *buf) @@ -299,11 +305,17 @@ void thermal_set_limit(struct device *dev, int val, int index) mutex_unlock(&data->update_lock); } -void lm95245_thermal_set_limit(struct device *dev, int val) +void lm95245_set_remote_os_limit(struct device *dev, int val) { thermal_set_limit(dev, val, INDEX_REMOTE_OS_LIMIT); } -EXPORT_SYMBOL(lm95245_thermal_set_limit); +EXPORT_SYMBOL(lm95245_set_remote_os_limit); + +void lm95245_set_remote_critical_limit(struct device *dev, int val) +{ + thermal_set_limit(dev, val, INDEX_REMOTE_TCRIT_LIMIT); +} +EXPORT_SYMBOL(lm95245_set_remote_critical_limit); static ssize_t set_limit(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |