Re: [PATCH] GADGET : allow to build multi udc

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

 



Hi,

Alan Stern a Ãcrit :
On Tue, 11 Jan 2011, Matthieu CASTET wrote:

Hi,

Any news/comments on this ?

With effort to make generic arm kernel (https://wiki.ubuntu.com/Specs/ARMSingleKernel) this could be really useful.

Also it could be usefull on x86 to support more than one pci udc driver..

Matthieu

Matthieu CASTET a ÃÂcrit :
Hello,

I seems there no work on UDC Class anymore. So I repost my multi udc patch.


Even if the usb gadget framework is limited to work with one driver, it
could be useful to have a kernel build with more than driver.
This allow to make generic kernel that work with different udc controller.

After looking at the current code, the only blocker to do that is
usb_gadget_register_driver/usb_gadget_unregister_driver function that
are declared in each driver.

For avoiding that I propose to do a redirection for these functions.
At probe time the driver register them (usb_gadget_register/usb_gadget_unregister), and
usb_gadget_register_driver/usb_gadget_unregister_driver call these callback.
We pass pass struct *usb_gadget in usb_gadget_register/usb_gadget_unregister for flexibility (we can latter do a more complex dispatcher).

the implementation is provided in multi_udc_core.diff.

The driver conversion is quite easy and we don't need to port all the driver at one time.

multi_udc_driver.diff is port for ci13xxx_udc.c and net2280.c

It's okay with me.  Assuming you make the appropriate changes in all
the other UDCs, of course.

I can't promise I will convert all of them.
But that's not a problem : we can have old style udc or new style udc.

I can convert all the pci one : net2280 and ci13xxx_udc are done
amd5536udc, goku_udc,langwell_udc are to be done.


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