mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
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>
This commit is contained in:
parent
656e7c36bd
commit
227ab58cff
1 changed files with 2 additions and 0 deletions
|
@ -1811,6 +1811,8 @@ static int atmel_usba_start(struct usb_gadget *gadget,
|
||||||
toggle_bias(udc, 1);
|
toggle_bias(udc, 1);
|
||||||
usba_writel(udc, CTRL, USBA_ENABLE_MASK);
|
usba_writel(udc, CTRL, USBA_ENABLE_MASK);
|
||||||
usba_int_enb_set(udc, USBA_END_OF_RESET);
|
usba_int_enb_set(udc, USBA_END_OF_RESET);
|
||||||
|
|
||||||
|
udc->vbus_prev = 1;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&udc->lock, flags);
|
spin_unlock_irqrestore(&udc->lock, flags);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue