Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 227ab58c authored by Sylvain Rochet's avatar Sylvain Rochet Committed by Felipe Balbi
Browse files

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: default avatarSylvain Rochet <sylvain.rochet@finsecur.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 656e7c36
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);