Hi, (wow, almost 2 months :-) On Mon, Dec 01, 2014 at 08:46:54PM +0200, Laurent Pinchart wrote: > > > +static void isp1760_udc_disconnect(struct isp1760_udc *udc) > > > +{ > > > + if (udc->gadget.state < USB_STATE_POWERED) > > > + return; > > > + > > > + dev_dbg(udc->isp->dev, "Device disconnected in state %u\n", > > > + udc->gadget.state); > > > + > > > + udc->gadget.speed = USB_SPEED_UNKNOWN; > > > + usb_gadget_set_state(&udc->gadget, USB_STATE_ATTACHED); > > > + > > > + if (udc->driver->disconnect) > > > + udc->driver->disconnect(&udc->gadget); > > > > alright, so this can be called from your reset IRQ handler. You need a > > little more inteligence on this branch because if you're coming from > > reset IRQ you only want to call gadget driver's disconnect in case speed > > != UNKNOWN. > > > > That has become easier, however, because of a recent patch adding > > ->reset() method which should be called from reset unconditionally and > > ->disconnect() will only be called from disconnect IRQ. > > OK, I'll fix that. look at linux-next, we have a new ->reset() callback which was introduced recently. -- balbi
Attachment:
signature.asc
Description: Digital signature