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,

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 ?

> 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.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux