Skip to contentSkip to conversation

usb-otg: atmel-usba-udc: initialize usb_prev to the actual value

PATCH New loïc tourlonias 2 participants 2 messages Apr 21, 2015 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CA+XxOSExCVBd0TFuY+wmjL-pxhp148H1FpnQLBtV0q2R5OwHzg@mail.gmail.com

#1 lore raw

PATCH 1/1 usb-otg: atmel-usba-udc: initialize usb_prev to the actual value

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.

---
 drivers/usb/gadget/atmel_usba_udc.c |    1 +
 1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/drivers/usb/gadget/atmel_usba_udc.c
index 1d97222..258edf9 100644

drivers/usb/gadget/atmel_usba_udc.c +1 -0
@@ -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);
 
Signature · 1 line
1.7.10.4