diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/twl4030-core.c | 13 |
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 @@ | |||
115 | 115 | ||
116 | #define TWL4030_NUM_SLAVES 4 | 116 | #define TWL4030_NUM_SLAVES 4 |
117 | 117 | ||
118 | #if defined(CONFIG_INPUT_TWL4030_PWRBUTTON) \ | ||
119 | || defined(CONFIG_INPUT_TWL4030_PWBUTTON_MODULE) | ||
120 | #define twl_has_pwrbutton() true | ||
121 | #else | ||
122 | #define twl_has_pwrbutton() false | ||
123 | #endif | ||
118 | 124 | ||
119 | /* Base Address defns for twl4030_map[] */ | 125 | /* Base Address defns for twl4030_map[] */ |
120 | 126 | ||
@@ -538,6 +544,13 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) | |||
538 | return PTR_ERR(child); | 544 | return PTR_ERR(child); |
539 | } | 545 | } |
540 | 546 | ||
547 | if (twl_has_pwrbutton()) { | ||
548 | child = add_child(1, "twl4030_pwrbutton", | ||
549 | NULL, 0, true, pdata->irq_base + 8 + 0, 0); | ||
550 | if (IS_ERR(child)) | ||
551 | return PTR_ERR(child); | ||
552 | } | ||
553 | |||
541 | if (twl_has_regulator()) { | 554 | if (twl_has_regulator()) { |
542 | /* | 555 | /* |
543 | child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1); | 556 | child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1); |