Skip to content

Commit

Permalink
mfd: twl-core: Register twl4030-madc child only for twl4030 class
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Ujfalusi authored and Samuel Ortiz committed Nov 21, 2012
1 parent c7b76dc commit 24ae36f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/mfd/twl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 24ae36f

Please sign in to comment.