aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/otg/twl6030-usb.c3
-rw-r--r--include/linux/usb/otg.h1
2 files changed, 4 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)
262 twl->otg.default_a = false; 262 twl->otg.default_a = false;
263 twl->otg.state = OTG_STATE_B_IDLE; 263 twl->otg.state = OTG_STATE_B_IDLE;
264 twl->linkstat = status; 264 twl->linkstat = status;
265 twl->otg.last_event = status;
265 blocking_notifier_call_chain(&twl->otg.notifier, 266 blocking_notifier_call_chain(&twl->otg.notifier,
266 status, twl->otg.gadget); 267 status, twl->otg.gadget);
267 } else { 268 } else {
268 status = USB_EVENT_NONE; 269 status = USB_EVENT_NONE;
269 twl->linkstat = status; 270 twl->linkstat = status;
271 twl->otg.last_event = status;
270 blocking_notifier_call_chain(&twl->otg.notifier, 272 blocking_notifier_call_chain(&twl->otg.notifier,
271 status, twl->otg.gadget); 273 status, twl->otg.gadget);
272 if (twl->asleep) { 274 if (twl->asleep) {
@@ -299,6 +301,7 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl)
299 twl->otg.default_a = true; 301 twl->otg.default_a = true;
300 twl->otg.state = OTG_STATE_A_IDLE; 302 twl->otg.state = OTG_STATE_A_IDLE;
301 twl->linkstat = status; 303 twl->linkstat = status;
304 twl->otg.last_event = status;
302 blocking_notifier_call_chain(&twl->otg.notifier, status, 305 blocking_notifier_call_chain(&twl->otg.notifier, status,
303 twl->otg.gadget); 306 twl->otg.gadget);
304 } else { 307 } else {
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index a1a1e7a73ec9..da511eec3cb8 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -66,6 +66,7 @@ struct otg_transceiver {
66 66
67 u8 default_a; 67 u8 default_a;
68 enum usb_otg_state state; 68 enum usb_otg_state state;
69 enum usb_xceiv_events last_event;
69 70
70 struct usb_bus *host; 71 struct usb_bus *host;
71 struct usb_gadget *gadget; 72 struct usb_gadget *gadget;