diff options
-rw-r--r-- | arch/arm/mach-tegra/board-apalis_t30.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-apalis_t30.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-colibri_t30.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-colibri_t30.h | 1 | ||||
-rw-r--r-- | drivers/hwmon/lm95245.c | 6 | ||||
-rw-r--r-- | include/linux/lm95245.h | 1 |
6 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-apalis_t30.c b/arch/arm/mach-tegra/board-apalis_t30.c index 493510bda657..5ed04bffba03 100644 --- a/arch/arm/mach-tegra/board-apalis_t30.c +++ b/arch/arm/mach-tegra/board-apalis_t30.c @@ -908,6 +908,10 @@ static void lm95245_probe_callback(struct device *dev) IRQF_TRIGGER_LOW, "THERMD_ALERT_N", NULL)) pr_err("%s: unable to register THERMD_ALERT_N interrupt\n", __func__); + + //initalize the local temp limit + if(dev) + lm95245_set_local_shared_os__critical_limit(dev, TCRIT_LOCAL); } static void apalis_t30_thermd_alert_init(void) diff --git a/arch/arm/mach-tegra/board-apalis_t30.h b/arch/arm/mach-tegra/board-apalis_t30.h index ad9d68c591d2..5ea5c0b31042 100644 --- a/arch/arm/mach-tegra/board-apalis_t30.h +++ b/arch/arm/mach-tegra/board-apalis_t30.h @@ -116,6 +116,7 @@ #define STMPE811_IRQ_END (STMPE811_IRQ_BASE + 22) #define TDIODE_OFFSET (10000) /* in millicelsius */ +#define TCRIT_LOCAL 95000 /* board temp to switch off PMIC in millicelsius*/ /* External peripheral act as gpio */ /* TPS6591x GPIOs */ diff --git a/arch/arm/mach-tegra/board-colibri_t30.c b/arch/arm/mach-tegra/board-colibri_t30.c index fcbae03f62b9..52c048d7ba98 100644 --- a/arch/arm/mach-tegra/board-colibri_t30.c +++ b/arch/arm/mach-tegra/board-colibri_t30.c @@ -1033,6 +1033,10 @@ static void lm95245_probe_callback(struct device *dev) IRQF_TRIGGER_LOW, "THERMD_ALERT", NULL)) pr_err("%s: unable to register THERMD_ALERT interrupt\n", __func__); + + //initalize the local temp limit + if(dev) + lm95245_set_local_shared_os__critical_limit(dev, TCRIT_LOCAL); } static void colibri_t30_thermd_alert_init(void) diff --git a/arch/arm/mach-tegra/board-colibri_t30.h b/arch/arm/mach-tegra/board-colibri_t30.h index babd6943add3..224549a897cd 100644 --- a/arch/arm/mach-tegra/board-colibri_t30.h +++ b/arch/arm/mach-tegra/board-colibri_t30.h @@ -85,6 +85,7 @@ #define STMPE811_IRQ_END (STMPE811_IRQ_BASE + 22) #define TDIODE_OFFSET (10000) /* in millicelsius */ +#define TCRIT_LOCAL 95000 /* board temperature which switches off PMIC in millicelsius*/ /* External peripheral act as gpio */ /* TPS6591x GPIOs */ diff --git a/drivers/hwmon/lm95245.c b/drivers/hwmon/lm95245.c index cea5048b1ba7..1b60fe6de776 100644 --- a/drivers/hwmon/lm95245.c +++ b/drivers/hwmon/lm95245.c @@ -317,6 +317,12 @@ void lm95245_set_remote_critical_limit(struct device *dev, int val) } EXPORT_SYMBOL(lm95245_set_remote_critical_limit); +void lm95245_set_local_shared_os__critical_limit(struct device *dev, int val) +{ + thermal_set_limit(dev, val, INDEX_LOCAL_OS_TCRIT_LIMIT); +} +EXPORT_SYMBOL(lm95245_set_local_shared_os__critical_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 1b0ddbd82759..ecc7ec57696a 100644 --- a/include/linux/lm95245.h +++ b/include/linux/lm95245.h @@ -32,5 +32,6 @@ 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); +void lm95245_set_local_shared_os__critical_limit(struct device *dev, int val); #endif /* _LINUX_LM95245_H */ |