diff options
author | Grazvydas Ignotas <notasas@gmail.com> | 2010-10-01 14:17:50 +0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-10-29 02:30:02 +0400 |
commit | 11c39c4bde7acb727f7a7c6a4d7ffeb95b64dbb4 (patch) | |
tree | 9584024dfd43ad501945c851da11e63db5a84a72 /drivers | |
parent | 1c97872b80691f6bd3e46ec431a0d59dc75cb8da (diff) | |
download | linux-11c39c4bde7acb727f7a7c6a4d7ffeb95b64dbb4.tar.xz |
mfd: Add twl4030_bci platform_data back
Now that we have twl4030 charger driver, add back it's platform_data
(which was removed by f7ea2dc59ed46dcd0f1cfaccda02211f4507207b
as unused).
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/twl-core.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index e77e1ffd26a9..35275ba7096f 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -115,6 +115,12 @@ #define twl_has_codec() false #endif +#if defined(CONFIG_CHARGER_TWL4030) || defined(CONFIG_CHARGER_TWL4030_MODULE) +#define twl_has_bci() true +#else +#define twl_has_bci() false +#endif + /* Triton Core internal information (BEGIN) */ /* Last - for index max*/ @@ -826,6 +832,17 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) return PTR_ERR(child); } + if (twl_has_bci() && pdata->bci && + !(features & (TPS_SUBSET | TWL5031))) { + child = add_child(3, "twl4030_bci", + pdata->bci, sizeof(*pdata->bci), false, + /* irq0 = CHG_PRES, irq1 = BCI */ + pdata->irq_base + BCI_PRES_INTR_OFFSET, + pdata->irq_base + BCI_INTR_OFFSET); + if (IS_ERR(child)) + return PTR_ERR(child); + } + return 0; } |