Message ID | BANLkTi=zt1j_s1uDfjL=SRG6_LS1pa3xAg@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, May 3, 2011 at 12:49 PM, J, KEERTHY <j-keerthy@ti.com> wrote: > Hello Steve, > > Can you try adding this patch? Thanks! I tried the patch and it did indeed fix the issue. We should try to get this in mainline since the hwmon driver won't work without it. Steve -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, May 4, 2011 at 9:41 AM, Steve Sakoman <sakoman@gmail.com> wrote: > On Tue, May 3, 2011 at 12:49 PM, J, KEERTHY <j-keerthy@ti.com> wrote: >> Hello Steve, >> >> Can you try adding this patch? > > Thanks! > > I tried the patch and it did indeed fix the issue. We should try to > get this in mainline since the hwmon driver won't work without it. > Yes Steve. I am posting a patch today. > Steve >
From a05c6cbb4494173e03ea5957666216caedb22d84 Mon Sep 17 00:00:00 2001 From: Keerthy <j-keerthy@ti.com> Date: Wed, 4 May 2011 01:14:50 +0530 Subject: [PATCH] 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 960b5be..e6e99db 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 @@ -609,6 +616,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.7.0.4