* [RFC/PATCH 2/2] Triton Battery charger interface driver for OMAP3430
@ 2008-06-20 12:06 x0070977
2008-06-23 8:51 ` Felipe Balbi
0 siblings, 1 reply; 3+ messages in thread
From: x0070977 @ 2008-06-20 12:06 UTC (permalink / raw)
To: linux-omap
From: Madhusudhan Chikkature <madhu.cr@ti.com>
This patch updates the twl4030 usb driver to call the functionality supported
by the TWL4030 battery charger interface driver to enable/disable battery
charging upon cable attach/detach.
Signed-off-by: Madhusudhan Chikkature <madhu.cr@ti.com>
---
drivers/i2c/chips/twl4030-usb.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
Index: linux-omap-2.6/drivers/i2c/chips/twl4030-usb.c
===================================================================
--- linux-omap-2.6.orig/drivers/i2c/chips/twl4030-usb.c 2008-06-20
15:42:26.000000000 +0530
+++ linux-omap-2.6/drivers/i2c/chips/twl4030-usb.c 2008-06-20
15:47:40.000000000 +0530
@@ -589,6 +589,12 @@
twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, PROTECT_KEY);
}
+#ifdef CONFIG_TWL4030_BCI_BATTERY
+extern int twl4030charger_usb_en(int enable);
+#else
+static inline int twl4030charger_usb_en(int enable) { return 0; }
+#endif
+
static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
{
int ret = IRQ_NONE;
@@ -601,10 +607,13 @@
goto done;
}
- if (val & USB_PRES_RISING)
+ if (val & USB_PRES_RISING) {
twl4030_phy_resume();
- else
+ twl4030charger_usb_en(1);
+ } else {
+ twl4030charger_usb_en(0);
twl4030_phy_suspend(0);
+ }
ret = IRQ_HANDLED;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC/PATCH 2/2] Triton Battery charger interface driver for OMAP3430
2008-06-20 12:06 [RFC/PATCH 2/2] Triton Battery charger interface driver for OMAP3430 x0070977
@ 2008-06-23 8:51 ` Felipe Balbi
2008-06-23 13:35 ` Madhusudhan Chikkature
0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2008-06-23 8:51 UTC (permalink / raw)
To: x0070977; +Cc: linux-omap
On Fri, 20 Jun 2008 17:36:00 +0530 (IST), x0070977@dbdmail.itg.ti.com
wrote:
> +#ifdef CONFIG_TWL4030_BCI_BATTERY
> +extern int twl4030charger_usb_en(int enable);
> +#else
> +static inline int twl4030charger_usb_en(int enable) { return 0; }
> +#endif
this should be in include/linux/i2c/twl4030.h
you should also change it for when bci is built as a
dynamically linked module.
--
Best Regards,
Felipe Balbi
http://felipebalbi.com
me@felipebalbi.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC/PATCH 2/2] Triton Battery charger interface driver for OMAP3430
2008-06-23 8:51 ` Felipe Balbi
@ 2008-06-23 13:35 ` Madhusudhan Chikkature
0 siblings, 0 replies; 3+ messages in thread
From: Madhusudhan Chikkature @ 2008-06-23 13:35 UTC (permalink / raw)
To: Felipe Balbi; +Cc: linux-omap
Hi Felipe,
Thanks for the comments. I will fix it and resend the patch.
Best regards,
Madhu
----- Original Message -----
From: "Felipe Balbi" <me@felipebalbi.com>
To: <x0070977@dbdmail.itg.ti.com>
Cc: <linux-omap@vger.kernel.org>
Sent: Monday, June 23, 2008 2:21 PM
Subject: Re: [RFC/PATCH 2/2] Triton Battery charger interface driver for OMAP3430
>
>
> On Fri, 20 Jun 2008 17:36:00 +0530 (IST), x0070977@dbdmail.itg.ti.com
> wrote:
>
>> +#ifdef CONFIG_TWL4030_BCI_BATTERY
>> +extern int twl4030charger_usb_en(int enable);
>> +#else
>> +static inline int twl4030charger_usb_en(int enable) { return 0; }
>> +#endif
>
> this should be in include/linux/i2c/twl4030.h
> you should also change it for when bci is built as a
> dynamically linked module.
Okay. Good point.
>
> --
> Best Regards,
>
> Felipe Balbi
> http://felipebalbi.com
> me@felipebalbi.com
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-23 13:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-20 12:06 [RFC/PATCH 2/2] Triton Battery charger interface driver for OMAP3430 x0070977
2008-06-23 8:51 ` Felipe Balbi
2008-06-23 13:35 ` Madhusudhan Chikkature
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox