Commit 9c3664dd authored by Felipe Balbi's avatar Felipe Balbi Committed by Samuel Ortiz

mfd: Add twl4030-pwrbutton as a twl4030 child

Make that twl4030-pwrbutton.c driver probe with current
child creation api for twl4030.

Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent fb6c023a
...@@ -115,6 +115,12 @@ ...@@ -115,6 +115,12 @@
#define TWL4030_NUM_SLAVES 4 #define TWL4030_NUM_SLAVES 4
#if defined(CONFIG_INPUT_TWL4030_PWRBUTTON) \
|| defined(CONFIG_INPUT_TWL4030_PWBUTTON_MODULE)
#define twl_has_pwrbutton() true
#else
#define twl_has_pwrbutton() false
#endif
/* Base Address defns for twl4030_map[] */ /* Base Address defns for twl4030_map[] */
...@@ -538,6 +544,13 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) ...@@ -538,6 +544,13 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
return PTR_ERR(child); return PTR_ERR(child);
} }
if (twl_has_pwrbutton()) {
child = add_child(1, "twl4030_pwrbutton",
NULL, 0, true, pdata->irq_base + 8 + 0, 0);
if (IS_ERR(child))
return PTR_ERR(child);
}
if (twl_has_regulator()) { if (twl_has_regulator()) {
/* /*
child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1); child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1);
......
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