Hi Simon,

On Monday, 13 July 2026 15:10:48 CEST Simon Glass wrote:
> Hi Romain,
> 
...
> > diff --git a/drivers/usb/gadget/renesas_usbf.c
> > b/drivers/usb/gadget/renesas_usbf.c @@ -0,0 +1,3036 @@
> > +static int usbf_remove(struct udevice *dev)
> > +{
> > +     struct usbf_udc *udc = dev_get_priv(dev);
> > +
> > +     usb_del_gadget_udc(&udc->gadget);
> > +
> > +     return 0;
> > +}
> 
> Just to check - if the device is removed while the pull-up is still
> asserted, D+ stays driven and interrupts remain enabled at the EPC
> level. Would it be worth calling usbf_detach() here so remove() always
> leaves the hardware quiescent? What do you think?

Sorry for the late response, things have been a bit too busy :).

Sure, while the UDC core does call detach on the device, there are other code 
paths  which could call remove() directly, so it's probably better to call 
detach here just to be safe.

Thanks,

-- 
Romain Gantois, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to