* [PATCH] mfd: twl4030: add twl4030_bci platform_data back
@ 2010-10-01 10:17 Grazvydas Ignotas
2010-10-05 15:53 ` Tony Lindgren
2010-10-18 22:42 ` Samuel Ortiz
0 siblings, 2 replies; 3+ messages in thread
From: Grazvydas Ignotas @ 2010-10-01 10:17 UTC (permalink / raw)
To: linux-omap; +Cc: Samuel Ortiz, Grazvydas Ignotas
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>
---
Well the driver is still in battery.git and linux-next, but I'm
pretty sure it will reach Linus.
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 b0f2c00..2f5258f 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;
}
--
1.6.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] mfd: twl4030: add twl4030_bci platform_data back
2010-10-01 10:17 [PATCH] mfd: twl4030: add twl4030_bci platform_data back Grazvydas Ignotas
@ 2010-10-05 15:53 ` Tony Lindgren
2010-10-18 22:42 ` Samuel Ortiz
1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2010-10-05 15:53 UTC (permalink / raw)
To: Grazvydas Ignotas; +Cc: linux-omap, Samuel Ortiz
* Grazvydas Ignotas <notasas@gmail.com> [101001 03:09]:
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mfd: twl4030: add twl4030_bci platform_data back
2010-10-01 10:17 [PATCH] mfd: twl4030: add twl4030_bci platform_data back Grazvydas Ignotas
2010-10-05 15:53 ` Tony Lindgren
@ 2010-10-18 22:42 ` Samuel Ortiz
1 sibling, 0 replies; 3+ messages in thread
From: Samuel Ortiz @ 2010-10-18 22:42 UTC (permalink / raw)
To: Grazvydas Ignotas; +Cc: linux-omap
Hi Grazvydas,
On Fri, Oct 01, 2010 at 01:17:50PM +0300, Grazvydas Ignotas wrote:
> Now that we have twl4030 charger driver, add back it's platform_data
> (which was removed by f7ea2dc59ed46dcd0f1cfaccda02211f4507207b
> as unused).
Patch applied, many thanks.
Cheers,
Samuel.
> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
> ---
> Well the driver is still in battery.git and linux-next, but I'm
> pretty sure it will reach Linus.
>
> 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 b0f2c00..2f5258f 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;
> }
>
> --
> 1.6.3.3
>
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-18 22:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-01 10:17 [PATCH] mfd: twl4030: add twl4030_bci platform_data back Grazvydas Ignotas
2010-10-05 15:53 ` Tony Lindgren
2010-10-18 22:42 ` Samuel Ortiz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).