lkml.org 
[lkml]   [2014]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Disable bus's drivers_autoprobe before rootfs has mounted
On Wed, Jun 11, 2014 at 02:36:27PM -0500, Felipe Balbi wrote:
> On Wed, Jun 11, 2014 at 11:29:57AM +0800, Peter Chen wrote:
> > On Tue, Jun 10, 2014 at 11:35:07PM -0500, Felipe Balbi wrote:
> > > Hi,
> > >
> > > On Tue, Jun 10, 2014 at 09:10:00PM -0700, Greg KH wrote:
> > > > > Let's take USB peripheral as an example, there is a device for
> > > > > udc, and a device driver for usb gadget driver, at default, we want
> > > > > the device to be bound to driver automatically, this is what
> > > > > we have done now. But if there are more than one udcs and gadget
> > > > > drivers (eg one B port for mass storage, another B port for usb ethernet),
> > > > > the user may want to have specific binding (eg, udc-0 -> mass storage,
> > > > > udc-1 -> usb ethernet), so the binding will be established
> > > > > after rootfs has mounted. (This feature is implementing)
> > > >
> > > > Then there better be a way to describe this on the kernel command line
> > > > (i.e. module paramaters), right? Which is a total mess, why not just
> > > > not bind anything in this case and let the user pick what they want?
> > >
> > > you can also blacklist all gadget drivers and manually probe them or -
> > > get this - you can refrain from using gadget drivers and use libusbg to
> > > build the gadget drivers out of raw usb functions, then bind them to the
> > > UDC of your liking.
> > >
> >
> > I am just worried if we change the behaviour of using gadget driver,
> > can it be accepted by user? If you think it can be accepted if we can
> > have some docs, we can implement manually binding for gadget driver
> > from now on.
>
> user shouldn't have to deal with direct module insertion/removal (unless
> he's a developer and actually *wants* to do that). Docs are already in
> tree. The entire configfs interface has been documented, it's based on
> those documents that Matt started writing libusbg.
>
> --
> balbi

Yes, gadget-configfs is a good direction.

I would like to know your plan for other gadget drivers (g_mass_storage,
g_webcam, etc)

All functions will be supported by configfs in future, and current
driver will be deleted?
- If yes, how to cover the user who still use the old file system?
- If no, which binding way for udc and gadget driver will be used?
Current binding way for non-configfs gadgets is auto-binding, if we
don't want break user's current system, we need to keep auto-binding
as the default binding way. With more, we can support manual
binding with udc core.

I am implementing gadget bus[1], it may not be benefit for gadget-configfs,
but is benefit for other gadgets, eg, support loading gadget driver
before udc driver, manual-binding between udc and gadget drivers, etc.
So, I would like to know if you agree to keep auto-binding for
current non-configfs gadget driver as default way (in that way, we can keep
current system with no change), and manual-binding can be used
by user with module parameters and /sys entry.

[1] http://www.spinics.net/lists/linux-usb/msg109015.html

--

Best Regards,
Peter Chen


\
 
 \ /
  Last update: 2014-06-12 11:21    [W:0.061 / U:15.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site