diff options
authorMarcel Ziswiler <>2013-01-09 16:36:16 +0100
committerMarcel Ziswiler <>2013-01-09 16:36:16 +0100
commit4aa5a91d37aad0f186f0e5b4863340c7d640d083 (patch)
parent65119fd57aeb0b52bfb30d19c052256f8fb08e6e (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.
2 files changed, 20 insertions, 6 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);
+void lm95245_get_remote_temp(struct device *dev, int *temp)
thermal_get_temp(dev, temp, INDEX_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)
-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);
+void lm95245_set_remote_critical_limit(struct device *dev, int val)
+ thermal_set_limit(dev, val, INDEX_REMOTE_TCRIT_LIMIT);
static ssize_t set_limit(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
diff --git a/include/linux/lm95245.h b/include/linux/lm95245.h
index cdc6846a901f..1b0ddbd82759 100644
--- a/include/linux/lm95245.h
+++ b/include/linux/lm95245.h
@@ -28,7 +28,9 @@ struct lm95245_platform_data {
void (*probe_callback)(struct device *dev);
-void lm95245_thermal_get_temp(struct device *dev, int *temp);
-void lm95245_thermal_set_limit(struct device *dev, int temp);
+void lm95245_get_local_temp(struct device *dev, int *temp);
+void lm95245_get_remote_temp(struct device *dev, int *temp);
+void lm95245_set_remote_os_limit(struct device *dev, int temp);
+void lm95245_set_remote_critical_limit(struct device *dev, int temp);
#endif /* _LINUX_LM95245_H */