Commit 42e11feb authored by Madhusudhan Chikkature's avatar Madhusudhan Chikkature Committed by Tony Lindgren

Triton BCI driver for OMAP3430 - USB changes

This patch calls 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>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent af12c73f
...@@ -601,10 +601,13 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl) ...@@ -601,10 +601,13 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
goto done; goto done;
} }
if (val & USB_PRES_RISING) if (val & USB_PRES_RISING) {
twl4030_phy_resume(); twl4030_phy_resume();
else twl4030charger_usb_en(1);
} else {
twl4030charger_usb_en(0);
twl4030_phy_suspend(0); twl4030_phy_suspend(0);
}
ret = IRQ_HANDLED; ret = IRQ_HANDLED;
......
...@@ -127,4 +127,11 @@ int twl4030_set_gpio_edge_ctrl(int gpio, int edge); ...@@ -127,4 +127,11 @@ int twl4030_set_gpio_edge_ctrl(int gpio, int edge);
int twl4030_set_gpio_debounce(int gpio, int enable); int twl4030_set_gpio_debounce(int gpio, int enable);
int twl4030_free_gpio(int gpio); int twl4030_free_gpio(int gpio);
#if defined(CONFIG_TWL4030_BCI_BATTERY) || \
defined(CONFIG_TWL4030_BCI_BATTERY_MODULE)
extern int twl4030charger_usb_en(int enable);
#else
static inline int twl4030charger_usb_en(int enable) { return 0; }
#endif
#endif /* End of __TWL4030_H */ #endif /* End of __TWL4030_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment