summaryrefslogtreecommitdiffstats
path: root/drivers/usb/otg
diff options
context:
space:
mode:
authorHema HK <hemahk@ti.com>2011-02-17 12:06:09 +0530
committerFelipe Balbi <balbi@ti.com>2011-02-18 14:05:52 +0200
commit647b2d9c61fe9a842dd89eb01b5f01e9d437993c (patch)
tree58e072fdd2e0058f993a42fc8032fc1384d149ea /drivers/usb/otg
parent070b8ed96e01adeb978d4f8487fb1350a28fcd0d (diff)
downloadlinux-stable-647b2d9c61fe9a842dd89eb01b5f01e9d437993c.tar.gz
linux-stable-647b2d9c61fe9a842dd89eb01b5f01e9d437993c.tar.bz2
linux-stable-647b2d9c61fe9a842dd89eb01b5f01e9d437993c.zip
usb: otg: TWL6030 Save the last event in otg_transceiver
Save the last event in the otg_transceiver so that it can used in the musb driver and gadget driver to configure the musb and enable the vbus for host mode and OTG mode, if the device is connected during boot. Signed-off-by: Hema HK <hemahk@ti.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Paul Walmsley <paul@pwsan.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/otg')
-rw-r--r--drivers/usb/otg/twl6030-usb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/otg/twl6030-usb.c b/drivers/usb/otg/twl6030-usb.c
index b4eda02c97f7..05f17b77d54c 100644
--- a/drivers/usb/otg/twl6030-usb.c
+++ b/drivers/usb/otg/twl6030-usb.c
@@ -262,11 +262,13 @@ static irqreturn_t twl6030_usb_irq(int irq, void *_twl)
twl->otg.default_a = false;
twl->otg.state = OTG_STATE_B_IDLE;
twl->linkstat = status;
+ twl->otg.last_event = status;
blocking_notifier_call_chain(&twl->otg.notifier,
status, twl->otg.gadget);
} else {
status = USB_EVENT_NONE;
twl->linkstat = status;
+ twl->otg.last_event = status;
blocking_notifier_call_chain(&twl->otg.notifier,
status, twl->otg.gadget);
if (twl->asleep) {
@@ -299,6 +301,7 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl)
twl->otg.default_a = true;
twl->otg.state = OTG_STATE_A_IDLE;
twl->linkstat = status;
+ twl->otg.last_event = status;
blocking_notifier_call_chain(&twl->otg.notifier, status,
twl->otg.gadget);
} else {