From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>,
linux-input@vger.kernel.org, David Jander <david@protonic.nl>,
David Jander <david.jander@protonic.nl>
Subject: Re: [PATCH v4 3/3] Input: gpio_keys.c: Enable use with non-local GPIO chips.
Date: Tue, 21 Jun 2011 18:27:45 +0100 [thread overview]
Message-ID: <20110621172744.GB26592@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <BANLkTikjUR_9wq_tGfomLZNdurvmEH1Jxw@mail.gmail.com>
On Tue, Jun 21, 2011 at 06:34:48AM -0700, Dmitry Torokhov wrote:
> On Jun 21, 2011 3:46 PM, "Mark Brown" <broonie@opensource.wolfsonmicro.com>
> > On Mon, Jun 20, 2011 at 01:45:12AM -0700, Dmitry Torokhov wrote:
> > Like Grant says this really isn't terribly sustainable - it's not just
> > the device registration you need to sort out, it's also the registration
> > of the drivers so things actually get bound and handing of any delays in
> > the process of getting things to appear.
> If devices are registered only when they are fully usable then driver
> registration does not matter.
Right, but this is something that it's not reasonable to implement in
board code - if nothing else implementing it in board code would mean
we'd got lots of repitition of common patterns.
> > It's not trivial to get this
> > right in the general case and it's not reasonable to expect individual
> > boards to open code things,
> Board code has the ultimate knowledge about connected devices though.
Absolutely, board code or data should provide the information about how
things are wired up. It's the acting on it bit that's the issue.
> > > How about we do not register device until all resources are ready? This
> > > is pretty simple concept - do not create an object until it is usable.
> Then
> > > nobody needs to bother with -EAGAIN or -ENOTYET or any other similar
> > > garbage.
> > As soon as you let the user build drivers modular this goes out of the
> > window.
> Why is that? If device is registered only when it is ready to be bound to
> then it does not matter when the driver is registered and whether it is
> built into the kernel or as a module.
Originally you were talking about registration ordering - solving the
module load issues also requires dynamic delays and rollbacks when
things get unregisterd, something that goes well beyond simple ordering
of the registrations.
> > All the faff with initcall ordering that we do at the minute is
> > essentially trying to implement this mechanism.
> No, what you are doing is creating devices before they are usable and
> postponing the driver registration in hopes that devices will be ready by
> that time.
Right, which is controlling the ordering of registration so that things
generally work out OK as described above.
Nobody's arguing that we don't want to solve this in a better way, we're
just saying that actually doing that requires improvements in both core
infrastructure and the data we've got available to the infrastructure so
there's no reasonable solutions that we can deploy which are better than
the initcall ordering stuff we're doing at the minute.
next prev parent reply other threads:[~2011-06-21 17:27 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 9:08 [PATCH v4 0/3] Input: gpio_keys.c: Add support for OF and I2C GPIO chips David Jander
2011-06-14 9:08 ` [PATCH v4 1/3] Input: gpio_keys.c: Simplify platform_device -> device casting David Jander
2011-06-16 19:28 ` Grant Likely
2011-06-18 10:19 ` Dmitry Torokhov
2011-06-20 6:52 ` David Jander
2011-06-20 8:32 ` Dmitry Torokhov
2011-06-14 9:08 ` [PATCH v4 2/3] Input: gpio_keys.c: Added support for device-tree platform data David Jander
2011-06-16 19:25 ` Grant Likely
2011-06-17 8:58 ` David Jander
2011-06-17 12:54 ` Grant Likely
2011-06-23 8:24 ` Dmitry Torokhov
2011-06-23 8:55 ` David Jander
2011-06-14 9:08 ` [PATCH v4 3/3] Input: gpio_keys.c: Enable use with non-local GPIO chips David Jander
2011-06-16 19:27 ` Grant Likely
2011-06-18 10:17 ` Dmitry Torokhov
2011-06-18 13:18 ` Grant Likely
2011-06-18 14:51 ` Dmitry Torokhov
2011-06-18 15:16 ` Grant Likely
2011-06-20 7:48 ` David Jander
2011-06-20 8:45 ` Dmitry Torokhov
2011-06-20 9:33 ` David Jander
2011-06-20 18:49 ` Grant Likely
2011-06-20 18:13 ` Grant Likely
2011-06-21 11:46 ` Mark Brown
[not found] ` <BANLkTikjUR_9wq_tGfomLZNdurvmEH1Jxw@mail.gmail.com>
2011-06-21 14:36 ` David Jander
2011-06-21 17:27 ` Mark Brown [this message]
2011-06-21 20:48 ` Dmitry Torokhov
2011-06-21 23:02 ` Mark Brown
2011-06-22 6:11 ` David Jander
2011-06-22 7:00 ` Dmitry Torokhov
2011-06-22 11:38 ` Mark Brown
2011-06-22 14:58 ` Grant Likely
2011-06-22 21:43 ` Dmitry Torokhov
2011-06-20 17:03 ` H Hartley Sweeten
2011-06-20 18:20 ` Grant Likely
2011-06-21 6:55 ` David Jander
2011-06-21 7:04 ` Grant Likely
2012-03-16 7:20 ` Dmitry Torokhov
2012-03-16 8:17 ` David Jander
2012-03-16 8:32 ` Dmitry Torokhov
2012-03-16 8:48 ` David Jander
2012-03-16 10:19 ` Ben Dooks
2012-03-16 10:18 ` Ben Dooks
2012-03-16 11:08 ` David Jander
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=20110621172744.GB26592@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=david.jander@protonic.nl \
--cc=david@protonic.nl \
--cc=dmitry.torokhov@gmail.com \
--cc=grant.likely@secretlab.ca \
--cc=linux-input@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.