From 4aa5a91d37aad0f186f0e5b4863340c7d640d083 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Wed, 9 Jan 2013 16:36:16 +0100 Subject: 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. --- drivers/hwmon/lm95245.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'drivers/hwmon') 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) -- cgit v1.2.3