Fwd: [PATCH] usb-otg: atmel-usba-udc: initialize usb_prev to the actual value

loïc tourlonias loic.tourlonias at gmail.com
Tue Apr 21 05:52:35 PDT 2015


During start of the usb gadget device, usb_prev must be initialize to
the actual value of vbus_pin to avoid missing the first usb host
detection.

Signed-off-by: ltourlonias <loic.tourlonias at gmail.com>
---
 drivers/usb/gadget/atmel_usba_udc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/atmel_usba_udc.c
b/drivers/usb/gadget/atmel_usba_udc.c
index 1d97222..258edf9 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -1796,6 +1796,7 @@ static int atmel_usba_start(struct usb_gadget *gadget,
  toggle_bias(1);
  usba_writel(udc, CTRL, USBA_ENABLE_MASK);
  usba_writel(udc, INT_ENB, USBA_END_OF_RESET);
+ udc->vbus_prev=1;
  }
  spin_unlock_irqrestore(&udc->lock, flags);

-- 
1.7.10.4



More information about the linux-arm-kernel mailing list