From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH RFC 1/7] [POWERPC] Implement GPIO API embryo
Date: Wed, 12 Dec 2007 20:10:43 +0300 [thread overview]
Message-ID: <20071212171043.GA32725@localhost.localdomain> (raw)
In-Reply-To: <20071212164847.GC4329@loki.buserror.net>
On Wed, Dec 12, 2007 at 10:48:47AM -0600, Scott Wood wrote:
> On Mon, Dec 10, 2007 at 11:48:25PM +0300, Anton Vorontsov wrote:
> > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> > index 232c298..596982f 100644
> > --- a/arch/powerpc/Kconfig
> > +++ b/arch/powerpc/Kconfig
> > @@ -73,6 +73,10 @@ config GENERIC_FIND_NEXT_BIT
> > bool
> > default y
> >
> > +config GENERIC_GPIO
> > + bool
> > + default n
> > +
>
> default n is the default. No need to explicitly state it.
Thanks, fill fix.
> > +
> > +int __of_parse_gpio_bank_pin(struct device_node *np, int index,
> > + int bank_width, int max_bank)
>
> Why the leading underscores?
This is low-level helper/library function, used by gpio controllers to
parse "bank pin" gpio = <> scheme. To denote that this isn't some kind
of API leading underscores are used.
> > diff --git a/include/asm-powerpc/gpio.h b/include/asm-powerpc/gpio.h
> > new file mode 100644
> > index 0000000..f7513ff
> > --- /dev/null
> > +++ b/include/asm-powerpc/gpio.h
> > @@ -0,0 +1,51 @@
> > +/*
> > + * Generic GPIO API implementation for PowerPC.
>
> Is there anything really powerpc specific here, or should it go under
> drivers/of?
Because <asm/gpio.h> should be used by all architectures to match
generic GPIO API. asm-sh/gpio.h asm-arm/gpio.h asm-avr32/gpio.h
and so on.
The only thing I can place into of.h is
- - - -
/*
* OF specific gpio_chip handler.
*/
struct of_gpio_chip {
int (*xlate)(struct device_node *np, int index);
};
- - - -
But frankly speaking, of_gpio_chip could be architecture-specific
too.
--
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2
next prev parent reply other threads:[~2007-12-12 17:07 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 [this message]
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
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=20071212171043.GA32725@localhost.localdomain \
--to=avorontsov@ru.mvista.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=scottwood@freescale.com \
/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.