RFC: add ep_autoconfig hook for gadget drivers

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

 



Some USB device controllers like pxa25x/27x/3xx require their
endpoints to be configured before the controller is enabled. Currently
these drivers use a static configuration that may or may not match
whatever combination of functions a gadget driver may bind to.

On at least pxa27x/3xx we can solve this problem by adding a hook
ep_autoconfig for the use of the controller drivers. This way the
controller driver can configure the endpoints sees when the gadget
driver is bound.

I've used this to get pxa27x_udc to configure its endpoints
dynamically (at gadget driver bind time, before the udc is enabled),
using the Android composite gadget driver to get RNDIS + USB mass
storage + ACM + ADB all working simultaneously.

Would something like the attached patch be acceptable? The basic idea
is to call an optional ep_autoconfig hook in usb_ep_autoconfig(), and
to add configuration and interface arguments to usb_ep_autoconfig().

Matt

Attachment: 0001-USB-gadget-add-ep_autoconfig-hook.patch
Description: Binary data


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

  Powered by Linux