===================================================================
@@ -265,11 +265,13 @@ static irqreturn_t twl6030_usb_irq(int i
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) {
@@ -302,6 +304,7 @@ static irqreturn_t twl6030_usbotg_irq(in
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 {
===================================================================
@@ -66,6 +66,7 @@ struct otg_transceiver {
u8 default_a;
enum usb_otg_state state;
+ enum usb_xceiv_events last_event;
struct usb_bus *host;
struct usb_gadget *gadget;