All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: falcon@meizu.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] async: async device driver probing
Date: Thu, 14 Aug 2014 06:02:23 +0800	[thread overview]
Message-ID: <20140813220223.GD7908@kroah.com> (raw)
In-Reply-To: <20140813172030.GA23628@core.coreip.homeip.net>

On Wed, Aug 13, 2014 at 10:20:33AM -0700, Dmitry Torokhov wrote:
> Hi Greg,
> 
> On Sat, Feb 08, 2014 at 10:27:29AM -0800, Greg KH wrote:

February?  That's an old thread to dig up...


> > On Sat, Feb 08, 2014 at 07:05:38PM +0800, falcon@meizu.com wrote:
> > > From: Wu Zhangjin <wuzhangjin@gmail.com>
> > > 
> > > [*Note*: NOT applicable, only for comments.]
> > > 
> > > To async the slow driver probing function of some devices, the device probing
> > > support is modified to support async scheduling.
> > > 
> > > In order to async your driver probing function, please mask the async_probe
> > > flag to 1, and to make sure one asynced probing is executed before an specified
> > > point, please call async_synchronize_full() in that point..
> > > 
> > > Usage:
> > > 
> > > 	static struct i2c_driver test_driver = {
> > > 		.driver = {
> > > 			.name   = TEST_DEV_NAME,
> > > 			.owner  = THIS_MODULE,
> > > 	+               .async_probe = 1,
> > > 		},
> > 
> > Why is this needed, we have defered probing and the container stuff, so
> > what problem is this solving?
> 
> Deferred probing only helps if resources are not ready yet, but
> sometimes we have a slow(ish) device which initialization stalls probing
> the rest of the system. For example a touchpad can take up to a second
> to calibrate itself after reset. One could try scheduling reset
> asynchronously, or try to offload it to open(), but that is not always
> best:
> 
> 1. Manual async: what to do when reset fails? Ideally we do not want to
> leave driver half-way bound with device not operable, but much rather
> signal the rest of the system that binding of the device failed and
> release all resources.
> 
> 2. Offload to open: the same issue as with manually doing async reset,
> plus sometimes we do not know all parameters that we should create input
> device with until after we reset physical device and queried it for
> capabilities.
> 
> Marking a driver to tell device core to execute probe asynchronously [at
> boot time] seems like a very appealing feature from driver author POV.
> 
> What is the container stuff you mention?

drivers/base/container.c


  reply	other threads:[~2014-08-13 22:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-08 11:05 [PATCH 1/2] async: async device driver probing falcon
2014-02-08 11:05 ` [PATCH 2/2] async: Allow to group the asynced device probings falcon
2014-02-08 18:28   ` Greg KH
2014-02-08 18:27 ` [PATCH 1/2] async: async device driver probing Greg KH
2014-08-13 17:20   ` Dmitry Torokhov
2014-08-13 22:02     ` Greg KH [this message]
2014-08-13 22:10       ` Dmitry Torokhov
2014-08-14  4:18         ` Greg KH
     [not found] <uovsqced4yboii55ncyjppla.1391933910239@email.android.com>
2014-02-13 23:59 ` Greg KH

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=20140813220223.GD7908@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=falcon@meizu.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.