Skip to content

Commit 252455c

Browse files
Suresh GuptaFelipe Balbi
Suresh Gupta
authored and
Felipe Balbi
committed
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: Suresh Gupta <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 97839ca commit 252455c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/usb/gadget/fsl_udc_core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,6 +1219,10 @@ static int fsl_pullup(struct usb_gadget *gadget, int is_on)
12191219
struct fsl_udc *udc;
12201220

12211221
udc = container_of(gadget, struct fsl_udc, gadget);
1222+
1223+
if (!udc->vbus_active)
1224+
return -EOPNOTSUPP;
1225+
12221226
udc->softconnect = (is_on != 0);
12231227
if (can_pullup(udc))
12241228
fsl_writel((fsl_readl(&dr_regs->usbcmd) | USB_CMD_RUN_STOP),

0 commit comments

Comments
 (0)