Commit 24ae36f5 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Samuel Ortiz

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: default avatarTero Kristo <t-kristo@ti.com>
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent c7b76dce
......@@ -646,7 +646,8 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
return PTR_ERR(child);
}
if (IS_ENABLED(CONFIG_TWL4030_MADC) && pdata->madc) {
if (IS_ENABLED(CONFIG_TWL4030_MADC) && pdata->madc &&
twl_class_is_4030()) {
child = add_child(2, "twl4030_madc",
pdata->madc, sizeof(*pdata->madc),
true, irq_base + MADC_INTR_OFFSET, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment