aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2012-11-13 03:28:42 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2012-11-21 10:07:58 -0500
commit24ae36f5c285d14f449dd19821aca1097a2a2313 (patch)
treeb3fc871357b44f057ddd6589190da5b15d53f6b1 /drivers/mfd
parentc7b76dce8ac95fd464bfae741b830d407884c274 (diff)
mfd: twl-core: Register twl4030-madc child only for twl4030 class
twl4030-madc driver can only handle twl4030 class MADC. The newer revisions of twl does not have MADC, instead they have different IP called GPADC which is not backward compatible. Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/twl-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 4ae642320205..262466837689 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -646,7 +646,8 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
646 return PTR_ERR(child); 646 return PTR_ERR(child);
647 } 647 }
648 648
649 if (IS_ENABLED(CONFIG_TWL4030_MADC) && pdata->madc) { 649 if (IS_ENABLED(CONFIG_TWL4030_MADC) && pdata->madc &&
650 twl_class_is_4030()) {
650 child = add_child(2, "twl4030_madc", 651 child = add_child(2, "twl4030_madc",
651 pdata->madc, sizeof(*pdata->madc), 652 pdata->madc, sizeof(*pdata->madc),
652 true, irq_base + MADC_INTR_OFFSET, 0); 653 true, irq_base + MADC_INTR_OFFSET, 0);