From: David Brownell <david-b@pacbell.net>
To: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpiolib: implement dynamic base allocation
Date: Wed, 5 Mar 2008 15:40:57 -0800 [thread overview]
Message-ID: <200803051540.57499.david-b@pacbell.net> (raw)
In-Reply-To: <20080305152450.167c9e8c.akpm@linux-foundation.org>
On Wednesday 05 March 2008, Andrew Morton wrote:
> On Tue, 4 Mar 2008 20:03:07 +0300
> Anton Vorontsov <avorontsov@ru.mvista.com> wrote:
>
> > If gpio_chip->base is negative during registration, gpiolib requests
> > dynamic base allocation. This is useful for devices being registered
> > at run-time (in contrast to platform devices).
> >
> > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> > ---
> > drivers/gpio/gpiolib.c | 42 ++++++++++++++++++++++++++++++++++++------
> > 1 files changed, 36 insertions(+), 6 deletions(-)
> >
>
> This conflicts in non-trivial ways with gpio-define-gpio_is_valid.patch.
> Could you please redo and retest against 2.6.25-rc3-mm1?
And when you do that, could you make it assign GPIO numbers from
the biggest number on down, instead of from the smallest on up?
Platforms normally assign those numbers from the bottom up ... so
dynamic assignment should try to avoid reusing any numbers that may
have been explicitly assigned, but not yet registered. (Of course,
if you can come up with a cleaner solution than that, it'd be great.
Maybe platforms should also be able to mark ranges as "in use" as
they start up, or something.)
And please add a pr_debug level message reporting dynamically
assigned ranges. That way, when problems crop up it'll be that
much easier to notice what went wrong.
- Dave
next prev parent reply other threads:[~2008-03-05 23:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-04 17:03 [PATCH] gpiolib: implement dynamic base allocation Anton Vorontsov
2008-03-05 23:24 ` Andrew Morton
2008-03-05 23:40 ` David Brownell [this message]
2008-03-06 1:02 ` Anton Vorontsov
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=200803051540.57499.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=akpm@linux-foundation.org \
--cc=avorontsov@ru.mvista.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox