提交 252455c4 编写于 作者: S Suresh Gupta 提交者: Felipe Balbi

usb: gadget: fsl driver pullup fix

This fix the fsl usb gadget driver in a way that the usb device
will be only "pulled up" on requests only when vbus is powered
Signed-off-by: NSuresh Gupta <suresh.gupta@freescale.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 97839ca4
...@@ -1219,6 +1219,10 @@ static int fsl_pullup(struct usb_gadget *gadget, int is_on) ...@@ -1219,6 +1219,10 @@ static int fsl_pullup(struct usb_gadget *gadget, int is_on)
struct fsl_udc *udc; struct fsl_udc *udc;
udc = container_of(gadget, struct fsl_udc, gadget); udc = container_of(gadget, struct fsl_udc, gadget);
if (!udc->vbus_active)
return -EOPNOTSUPP;
udc->softconnect = (is_on != 0); udc->softconnect = (is_on != 0);
if (can_pullup(udc)) if (can_pullup(udc))
fsl_writel((fsl_readl(&dr_regs->usbcmd) | USB_CMD_RUN_STOP), fsl_writel((fsl_readl(&dr_regs->usbcmd) | USB_CMD_RUN_STOP),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册