All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: cbouatmailru@gmail.com, avorontsov@ru.mvista.com
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH RFC 4/7] [GPIO] Let drivers link if they support GPIO API as an addition
Date: Fri, 22 Feb 2008 15:42:03 -0800	[thread overview]
Message-ID: <200802221542.03359.david-b@pacbell.net> (raw)
In-Reply-To: <20071210230445.GA1141@zarina>

On Monday 10 December 2007, Anton Vorontsov wrote:
> On Mon, Dec 10, 2007 at 02:55:24PM -0800, David Brownell wrote:

> > The point of CONFIG_GENERIC_GPIO is to be *the* conditional used to
> > tell whether that programming interface is available ... starting
> > from "#include <asm/gpio.h>", and including all gpio_*() calls.
> > 
> > So my first reaction is to not like this patch.  It changes semantics
> > in an incompatible way.  And AFAICT, needlessly so.
> 
> Why incompatible? gpio-aware drivers will get -ENOSYS on gpio_request,
> thus they will not do anything wrong. GPIO-only drivers could still
> depend on GENERIC_GPIO, and their behaviour will not change.

If you still want this, I think a better approach would be:

  http://marc.info/?l=linux-kernel&m=120295461410848&w=2

That is, #include <linux/gpio.h> and have *that* do the relevant
switch, based on GENERIC_GPIO.  No semantic changes at all, if
one discounts the implicit switch to <linux/gpio.h> (important
for platforms that don't *have* any <asm/gpio.h> header), which
won't affect any existing code.

So your NAND code could use that, and work equally well on
SOC variants that have generic GPIOs and those that don't.

Comments?

- Dave

  reply	other threads:[~2008-02-22 23:42 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-10 20:47 [PATCH RFC 0/7] "NAND on UPM" and related patches Anton Vorontsov
2007-12-10 20:48 ` [PATCH RFC 1/7] [POWERPC] Implement GPIO API embryo Anton Vorontsov
2007-12-12 16:48   ` Scott Wood
2007-12-12 17:10     ` Anton Vorontsov
2007-12-10 20:48 ` [PATCH RFC 2/7] [POWERPC] QE: implement GPIO API Anton Vorontsov
2007-12-10 20:48 ` [PATCH RFC 3/7] [POWERPC] CPM2: " Anton Vorontsov
2007-12-12 15:49   ` Jochen Friedrich
2007-12-12 16:03     ` Anton Vorontsov
2007-12-12 16:56   ` Scott Wood
2007-12-10 20:49 ` [PATCH RFC 4/7] [GPIO] Let drivers link if they support GPIO API as an addition Anton Vorontsov
2007-12-10 22:55   ` David Brownell
2007-12-10 23:04     ` Anton Vorontsov
2008-02-22 23:42       ` David Brownell [this message]
2008-02-22 23:35         ` Anton Vorontsov
2007-12-10 20:49 ` [PATCH RFC 5/7] [POWERPC] FSL UPM: routines to manage FSL UPMs Anton Vorontsov
2007-12-10 20:49 ` [PATCH RFC 6/7] [POWERPC][NAND] FSL UPM NAND driver Anton Vorontsov
2007-12-10 20:49 ` [PATCH RFC 7/7] [POWERPC] MPC8360E-RDK: add support for NAND on UPM Anton Vorontsov
2007-12-10 23:03   ` David Gibson
2007-12-10 23:16     ` Anton Vorontsov
2007-12-12 16:59   ` Scott Wood
2007-12-10 23:04 ` [PATCH RFC 0/7] "NAND on UPM" and related patches David Gibson
2007-12-10 23:10   ` Anton Vorontsov
2007-12-11  0:36     ` David Gibson
2007-12-12 12:47       ` Anton Vorontsov
2007-12-16  6:44         ` David Gibson
2007-12-12 16:39 ` Scott Wood
2007-12-12 16:40 ` Scott Wood
2007-12-12 16:55   ` Anton Vorontsov
2007-12-12 16:54     ` Scott Wood
2007-12-12 20:58       ` Anton Vorontsov
2007-12-12 21:06         ` Scott Wood
2007-12-12 21:13           ` Scott Wood
2007-12-13 14:09           ` Anton Vorontsov
2007-12-13  3:01 ` Chris Fester

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=200802221542.03359.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=avorontsov@ru.mvista.com \
    --cc=cbouatmailru@gmail.com \
    --cc=linuxppc-dev@ozlabs.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.