mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen@freescale.com>
To: Alan Stern <stern@rowland.harvard.edu>, Felipe Balbi <balbi@ti.com>
Cc: Greg KH <gregkh@linuxfoundation.org>, <linux-usb@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: Disable bus's drivers_autoprobe before rootfs has mounted
Date: Thu, 12 Jun 2014 14:31:05 +0800	[thread overview]
Message-ID: <20140612063104.GB18009@shlinux1.ap.freescale.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1406111520270.890-100000@iolanthe.rowland.org>

On Wed, Jun 11, 2014 at 03:27:13PM -0400, Alan Stern wrote:
> On Wed, 11 Jun 2014, Greg KH wrote:
> 
> > We can't break existing systems, so I don't understand the issue here.
> > Just don't configure your kernel for a system you don't have / want,
> > right?
> > 
> > > > > From what I read code, we can't implement above feature, but I may
> > > > > be wrong, if you have some solutions, give me some hints please.
> > > > > If there is no solution for above feature, do we agree with exporting
> > > > > .drivers_autoprobe for bus driver or something similar?
> > > > 
> > > > I don't understand what you mean by this, care to show me with code?
> > > 
> > > I mean the individual bus driver can't change bus->p->drivers_autoprobe?
> > > bus->p->drivers_autoprobe is handled at drivers/base/bus.c.
> > > 
> > > If the individual bus driver can change bus->p->drivers_autoprobe, we
> > > can disable autoprobe (auto-binding) during booting.
> > 
> > No, that's a core only thing.
> 
> Peter, correct me if this is wrong.  It sounds like you want to have a 
> way for the user to control which gadget driver gets bound to which UDC 
> driver when everything is compiled into the kernel, nothing is built 
> as a separate module.  Is that the basic idea?

Yes, I know it can be done by gadget-configfs, but how about the user
chooses other gadgets, eg: g_webcam, g_audio?

I forget to introduce the background of this topic, I have this issue
when I implement gadget bus patch set.
(http://www.spinics.net/lists/linux-usb/msg107797.html)
The current behaviour for other gadgets is auto-binding, so I want
to keep auto-binding at my gadget bus implementation, but manual-binding
is also a feature we need to support for other gadgets, so I
want auto-binding is the default binding way, and the user can switch
the two binding ways, eg, module parameters or sys entry.

But if both udc driver and gadget driver are built in, the user can't
let manual-binding work during the boot since the device-model will
do probe, and do auto-binding.

My v1 patch set [3/4] do a tricky way to work around it, I would like to
know if it can be supported by device model framework?

> 
> This shouldn't be a problem if you use configfs or libusbg.
> 
> Alan Stern
> 

-- 

Best Regards,
Peter Chen

  reply	other threads:[~2014-06-12  7:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11  2:14 Peter Chen
2014-06-11  4:10 ` Greg KH
2014-06-11  3:23   ` Peter Chen
2014-06-11 19:10     ` Greg KH
2014-06-11 19:27       ` Alan Stern
2014-06-12  6:31         ` Peter Chen [this message]
2014-06-12 14:12           ` Alan Stern
2014-06-13 10:15             ` Peter Chen
2014-06-13 14:19               ` Alan Stern
2014-06-16  1:36                 ` Peter Chen
2014-06-16 15:00                   ` Alan Stern
2014-06-17  2:04                     ` Peter Chen
2014-06-11  4:35   ` Felipe Balbi
2014-06-11  3:29     ` Peter Chen
2014-06-11 19:36       ` Felipe Balbi
2014-06-12  7:02         ` Peter Chen
2014-06-12 16:53           ` Felipe Balbi
2014-06-13  7:30             ` Peter Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140612063104.GB18009@shlinux1.ap.freescale.net \
    --to=peter.chen@freescale.com \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®