RE: [RFC] usb: gadget: Ensure correct functionality for gadgets that wish to 'connect' only when directed by user-space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> -----Original Message-----
> From: Laurent Pinchart [mailto:laurent.pinchart@xxxxxxxxxxxxxxxx]
> Sent: Thursday, July 26, 2012 3:50 PM
> To: balbi@xxxxxx
> Cc: Bhupesh SHARMA; linux-usb@xxxxxxxxxxxxxxx
> Subject: Re: [RFC] usb: gadget: Ensure correct functionality for
> gadgets that wish to 'connect' only when directed by user-space
> 
> On Thursday 26 July 2012 13:11:47 Felipe Balbi wrote:
> > On Thu, Jul 26, 2012 at 11:53:57AM +0200, Laurent Pinchart wrote:
> > > > Until then, I don't think we have a solution for this problem
> which
> > > > would work always and, in fact, I don't want to have such a
> solution
> > > > otherwise we will have to maintain it for the forseeable future.
> > >
> > > I don't agree with you here.
> > >
> > > The existing usb_gadget_disconnect() function is documented as
> > >
> > >  * Disables the D+ (or potentially D-) pullup, which the host may
> see
> > >  * as a disconnect (when a VBUS session is active).  Not all
> systems
> > >  * support software pullup controls.
> > >  *
> > >  * This routine may be used during the gadget driver bind() call to
> > >  prevent
> > >  * the peripheral from ever being visible to the USB host, unless
> later
> > >  * usb_gadget_connect() is called.  For example, user mode
> components may
> > >  * need to be activated before the system can talk to hosts.
> > >
> > > In practice this doesn't work, calling usb_gadget_disconnect()
> during bind
> > > doesn't prevent the device from being visible to the USB host.
> That's what
> > > I
> > Ok, I missed that memo, sorry. To me it's working fine, actually.
> What's
> > the issue you have with that ?
> 
> I just doesn't work :-) Calling usb_gadget_disconnect() during bind
> doesn't
> prevent the device from being visible to the USB host. Bhupesh has
> analyzed
> the problem and submitted this RFC as a possible fix.

Yes. Felipe, plz go through the problem description as mentioned in the patch log
message which can be seen here:
http://permalink.gmane.org/gmane.linux.usb.general/66585

Regards,
Bhupesh

> > > think should be fixed, until the configfs-based solution is ready.
> > >
> > > We should of course not add any API to expose ->pullup() to
> userspace as
> > > an interim solution, as that one would need to be maintained.
> >
> > correct.
> 
> --
> Regards,
> 
> Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux