From 647b2d9c61fe9a842dd89eb01b5f01e9d437993c Mon Sep 17 00:00:00 2001 From: Hema HK Date: Thu, 17 Feb 2011 12:06:09 +0530 Subject: 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 Cc: Tony Lindgren Cc: Paul Walmsley Signed-off-by: Felipe Balbi --- drivers/usb/otg/twl6030-usb.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/usb/otg') diff --git a/drivers/usb/otg/twl6030-usb.c b/drivers/usb/otg/twl6030-usb.c index b4eda02..05f17b7 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 { -- cgit v1.1