diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2011-05-21 10:55:49 +0200 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-05-21 10:55:49 +0200 |
commit | 1735237550d85da337ea57cb5d6be9ccc8c0355c (patch) | |
tree | 1f6e1ae7c5e4a3eb37b2995c58707b21d6a9ec7a /recipes-kernel/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch | |
parent | 07e8c30da96d52798069494f17ab7f871357f3b5 (diff) | |
download | meta-ti-1735237550d85da337ea57cb5d6be9ccc8c0355c.tar.gz |
linux-omap 2.6.39: import from OE
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-kernel/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch')
-rw-r--r-- | recipes-kernel/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch b/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch new file mode 100644 index 00000000..771c2846 --- /dev/null +++ b/recipes-kernel/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 79dc823c9ce624a2164a01b35a89452b22a7d174 Mon Sep 17 00:00:00 2001 | ||
2 | From: Keerthy <j-keerthy@ti.com> | ||
3 | Date: Wed, 4 May 2011 01:14:50 +0530 | ||
4 | Subject: [PATCH 20/28] Enabling Hwmon driver for twl4030-madc | ||
5 | |||
6 | Signed-off-by: Keerthy <j-keerthy@ti.com> | ||
7 | --- | ||
8 | drivers/mfd/twl-core.c | 15 +++++++++++++++ | ||
9 | 1 files changed, 15 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c | ||
12 | index 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 | -- | ||
45 | 1.6.6.1 | ||
46 | |||