Re: Gadget driver ->disconnect callback during unbinding

2017-06-15 Thread Alan Stern
On Thu, 15 Jun 2017, Peter Chen wrote: > > > No, ->pullup is expected to be called from UDC core, and the UDC core > > > makes sure the coming ->disconnect at kinds of situations. > > > > I think you are wrong. The UDC core calls ->pullup from the > > usb_gadget_disconnect() routine, but it

Re: Gadget driver ->disconnect callback during unbinding

2017-06-14 Thread Peter Chen
On Wed, Jun 14, 2017 at 10:26:29AM -0400, Alan Stern wrote: > On Wed, 14 Jun 2017, Peter Chen wrote: > > > On Tue, Jun 13, 2017 at 10:22:26AM -0400, Alan Stern wrote: > > > On Tue, 13 Jun 2017, Felipe Balbi wrote: > > > > > > > > > > > Hi Alan, > > > > > > > > Alan Stern

Re: Gadget driver ->disconnect callback during unbinding

2017-06-14 Thread Alan Stern
On Wed, 14 Jun 2017, Peter Chen wrote: > On Tue, Jun 13, 2017 at 10:22:26AM -0400, Alan Stern wrote: > > On Tue, 13 Jun 2017, Felipe Balbi wrote: > > > > > > > > Hi Alan, > > > > > > Alan Stern writes: > > > > Felipe: > > > > > > > > A UDC driver will invoke the

Re: Gadget driver ->disconnect callback during unbinding

2017-06-13 Thread Peter Chen
On Tue, Jun 13, 2017 at 10:22:26AM -0400, Alan Stern wrote: > On Tue, 13 Jun 2017, Felipe Balbi wrote: > > > > > Hi Alan, > > > > Alan Stern writes: > > > Felipe: > > > > > > A UDC driver will invoke the gadget driver's ->disconnect callback > > > whenever the D+

Re: Gadget driver ->disconnect callback during unbinding

2017-06-13 Thread Alan Stern
On Tue, 13 Jun 2017, Felipe Balbi wrote: > > Hi Alan, > > Alan Stern writes: > > Felipe: > > > > A UDC driver will invoke the gadget driver's ->disconnect callback > > whenever the D+ pullup is turned off. During gadget driver unbinding, > > this happens

Re: Gadget driver ->disconnect callback during unbinding

2017-06-13 Thread Felipe Balbi
Hi Alan, Alan Stern writes: > Felipe: > > A UDC driver will invoke the gadget driver's ->disconnect callback > whenever the D+ pullup is turned off. During gadget driver unbinding, > this happens automatically when usb_gadget_remove_driver() calls >