diff options
author | Sylvain Rochet <sylvain.rochet@finsecur.com> | 2015-02-12 18:54:04 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-03-11 10:19:36 -0500 |
commit | 227ab58cff3c26ec279598112887d6bcca677a0c (patch) | |
tree | 8ddde141147f6511c03af3da8d90f2ba550d32ca /drivers/usb/gadget | |
parent | 656e7c36bd70e115266cf280e0ff049506ceb16c (diff) | |
download | op-kernel-dev-227ab58cff3c26ec279598112887d6bcca677a0c.zip op-kernel-dev-227ab58cff3c26ec279598112887d6bcca677a0c.tar.gz |
usb: gadget: atmel_usba_udc: Fixed vbus_prev initial state
If vbus gpio is high at init, we should set vbus_prev to true
accordingly to the current vbus state. Without that, we skip the first
vbus interrupt because the saved vbus state is not consistent.
Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/udc/atmel_usba_udc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c index d79cb35..e63c6fc 100644 --- a/drivers/usb/gadget/udc/atmel_usba_udc.c +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c @@ -1811,6 +1811,8 @@ static int atmel_usba_start(struct usb_gadget *gadget, toggle_bias(udc, 1); usba_writel(udc, CTRL, USBA_ENABLE_MASK); usba_int_enb_set(udc, USBA_END_OF_RESET); + + udc->vbus_prev = 1; } spin_unlock_irqrestore(&udc->lock, flags); |