diff options
| -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 @@ | |||
| 115 | #define twl_has_codec() false | 115 | #define twl_has_codec() false |
| 116 | #endif | 116 | #endif |
| 117 | 117 | ||
| 118 | #if defined(CONFIG_CHARGER_TWL4030) || defined(CONFIG_CHARGER_TWL4030_MODULE) | ||
| 119 | #define twl_has_bci() true | ||
| 120 | #else | ||
| 121 | #define twl_has_bci() false | ||
| 122 | #endif | ||
| 123 | |||
| 118 | /* Triton Core internal information (BEGIN) */ | 124 | /* Triton Core internal information (BEGIN) */ |
| 119 | 125 | ||
| 120 | /* Last - for index max*/ | 126 | /* Last - for index max*/ |
| @@ -826,6 +832,17 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) | |||
| 826 | return PTR_ERR(child); | 832 | return PTR_ERR(child); |
| 827 | } | 833 | } |
| 828 | 834 | ||
| 835 | if (twl_has_bci() && pdata->bci && | ||
| 836 | !(features & (TPS_SUBSET | TWL5031))) { | ||
| 837 | child = add_child(3, "twl4030_bci", | ||
| 838 | pdata->bci, sizeof(*pdata->bci), false, | ||
| 839 | /* irq0 = CHG_PRES, irq1 = BCI */ | ||
| 840 | pdata->irq_base + BCI_PRES_INTR_OFFSET, | ||
| 841 | pdata->irq_base + BCI_INTR_OFFSET); | ||
| 842 | if (IS_ERR(child)) | ||
| 843 | return PTR_ERR(child); | ||
| 844 | } | ||
| 845 | |||
| 829 | return 0; | 846 | return 0; |
| 830 | } | 847 | } |
| 831 | 848 | ||
