summaryrefslogtreecommitdiffstats
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 @@
1From 931bd787effbd6f1f00468c89c647c66c0bbc164 Mon Sep 17 00:00:00 2001
2From: Keerthy <j-keerthy@ti.com>
3Date: Wed, 4 May 2011 01:14:50 +0530
4Subject: [PATCH 20/32] Enabling Hwmon driver for twl4030-madc
5
6Signed-off-by: Keerthy <j-keerthy@ti.com>
7---
8 drivers/mfd/twl-core.c | 15 +++++++++++++++
9 1 files changed, 15 insertions(+), 0 deletions(-)
10
11diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
12index 8804550..d9435e4 100644
13--- a/drivers/mfd/twl-core.c
14+++ b/drivers/mfd/twl-core.c
15@@ -83,6 +83,13 @@
16 #define twl_has_madc() false
17 #endif
18
19+#if defined(CONFIG_SENSORS_TWL4030_MADC) ||\
20+ defined(CONFIG_SENSORS_TWL4030_MADC_MODULE)
21+#define twl_has_madc_hwmon() true
22+#else
23+#define twl_has_madc_hwmon() false
24+#endif
25+
26 #ifdef CONFIG_TWL4030_POWER
27 #define twl_has_power() true
28 #else
29@@ -619,6 +626,14 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
30 return PTR_ERR(child);
31 }
32
33+if (twl_has_madc_hwmon()) {
34+ child = add_child(2, "twl4030_madc_hwmon",
35+ NULL, 0,
36+ true, pdata->irq_base + MADC_INTR_OFFSET, 0);
37+ if (IS_ERR(child))
38+ return PTR_ERR(child);
39+ }
40+
41 if (twl_has_rtc()) {
42 /*
43 * REVISIT platform_data here currently might expose the
44--
451.6.6.1
46