summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@nokia.com>2009-08-03 18:16:38 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2009-09-17 09:46:52 +0200
commit9c3664ddcee8d56c54bc6a735bbc3cf77723d85d (patch)
treea4bc22f5aee0e5a7890b66dec95b383b6eaaed9a /drivers/mfd
parentfb6c023a2b845df1ec383b74644ac35a4bbb76b6 (diff)
downloadlinux-9c3664ddcee8d56c54bc6a735bbc3cf77723d85d.tar.bz2
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: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/twl4030-core.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/mfd/twl4030-core.c b/drivers/mfd/twl4030-core.c
index ca54996ffd0e..1fd2620819d0 100644
--- a/drivers/mfd/twl4030-core.c
+++ b/drivers/mfd/twl4030-core.c
@@ -115,6 +115,12 @@
#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[] */
@@ -538,6 +544,13 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
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()) {
/*
child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1);