aboutsummaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch')
-rw-r--r--extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch
new file mode 100644
index 00000000..c80aef9a
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch
@@ -0,0 +1,46 @@
+From 931bd787effbd6f1f00468c89c647c66c0bbc164 Mon Sep 17 00:00:00 2001
+From: Keerthy <j-keerthy@ti.com>
+Date: Wed, 4 May 2011 01:14:50 +0530
+Subject: [PATCH 20/32] Enabling Hwmon driver for twl4030-madc
+
+Signed-off-by: Keerthy <j-keerthy@ti.com>
+---
+ drivers/mfd/twl-core.c | 15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
+index 8804550..d9435e4 100644
+--- a/drivers/mfd/twl-core.c
++++ b/drivers/mfd/twl-core.c
+@@ -83,6 +83,13 @@
+ #define twl_has_madc() false
+ #endif
+
++#if defined(CONFIG_SENSORS_TWL4030_MADC) ||\
++ defined(CONFIG_SENSORS_TWL4030_MADC_MODULE)
++#define twl_has_madc_hwmon() true
++#else
++#define twl_has_madc_hwmon() false
++#endif
++
+ #ifdef CONFIG_TWL4030_POWER
+ #define twl_has_power() true
+ #else
+@@ -619,6 +626,14 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
+ return PTR_ERR(child);
+ }
+
++if (twl_has_madc_hwmon()) {
++ child = add_child(2, "twl4030_madc_hwmon",
++ NULL, 0,
++ true, pdata->irq_base + MADC_INTR_OFFSET, 0);
++ if (IS_ERR(child))
++ return PTR_ERR(child);
++ }
++
+ if (twl_has_rtc()) {
+ /*
+ * REVISIT platform_data here currently might expose the
+--
+1.6.6.1
+