For the list archives: here's the latest version of this.
The signed-off-by discussion is offlist right now, so this
version has none; see what eventually merges.
From: Philipp Zabel <[EMAIL PROTECTED]>
Arch-neutral GPIO calls for PXA.
Index: pxa/include/asm-arm/arch-pxa/gpio.h
===
On Friday 29 December 2006 6:15 pm, Nicolas Pitre wrote:
> On Thu, 28 Dec 2006, David Brownell wrote:
>
> > Phillip: is this the final version, then? It's missing
> > a signed-off-by line, so I can't do anything appropriate.
> >
> > Nico, your signoff here would be a Good Thing too if it
> > me
On Thu, 28 Dec 2006, David Brownell wrote:
> Phillip: is this the final version, then? It's missing
> a signed-off-by line, so I can't do anything appropriate.
>
> Nico, your signoff here would be a Good Thing too if it
> meets your technical review. (My only comment, ISTR, was
> that gpio_set
Just FYI -- I updated your patch, fixed a compile bug, and switched
some code over to use this new API. The patch is appended.
I happen to think it's a lot easier to read this way. Maybe to some
people it's easy to remember what a GPLR, GPCR, and GPSR register is
supposed to do, after a long tim
On Thu 2006-12-28 21:50:55, Pavel Machek wrote:
> Hi!
>
> > > > From: Philipp Zabel <[EMAIL PROTECTED]>
> > >
> > > Missing s-o-b?
> >
> > Yes, still ...
> >
> > > > +static inline int gpio_direction_input(unsigned gpio)
> > > > +{
> > > > + if (gpio > PXA_LAST_GPIO)
> > > > +
Hi!
> > > From: Philipp Zabel <[EMAIL PROTECTED]>
> >
> > Missing s-o-b?
>
> Yes, still ...
>
> > > +static inline int gpio_direction_input(unsigned gpio)
> > > +{
> > > + if (gpio > PXA_LAST_GPIO)
> > > + return -EINVAL;
> > > + pxa_gpio_mode(gpio | GPIO_IN);
> > > +}
> >
> > Missing
On Wednesday 27 December 2006 9:53 am, Pavel Machek wrote:
> Hi!
>
> > Arch-neutral GPIO calls for PXA.
> >
> > From: Philipp Zabel <[EMAIL PROTECTED]>
>
> Missing s-o-b?
Yes, still ...
> > +static inline int gpio_direction_input(unsigned gpio)
> > +{
> > + if (gpio > PXA_LAST_GPIO)
> > +
Phillip: is this the final version, then? It's missing
a signed-off-by line, so I can't do anything appropriate.
Nico, your signoff here would be a Good Thing too if it
meets your technical review. (My only comment, ISTR, was
that gpio_set_value macro should probably test for whether
the value
Hi!
> Arch-neutral GPIO calls for PXA.
>
> From: Philipp Zabel <[EMAIL PROTECTED]>
Missing s-o-b?
> +static inline int gpio_direction_input(unsigned gpio)
> +{
> + if (gpio > PXA_LAST_GPIO)
> + return -EINVAL;
> + pxa_gpio_mode(gpio | GPIO_IN);
> +}
Missing return 0?
> +s
On 12/21/06, Nicolas Pitre <[EMAIL PROTECTED]> wrote:
On Thu, 21 Dec 2006, pHilipp Zabel wrote:
> > > --- linux-2.6.orig/arch/arm/mach-pxa/generic.c2006-12-16
> > > +++ linux-2.6/arch/arm/mach-pxa/generic.c 2006-12-16
> > > 16:47:45.0
> > > @@ -129,6 +129,29 @@
> > > EXPORT_S
Guys:
Probably? What I am wondering is this: can the compiler
optimize away the range check that is duplicated in GPSR/GPCR
and GPIO_bit for __gpio_set/get_value? Or could we optimize
this case by expanding the macros in place (which would mean
duplicating code from pxa-regs.h)...
Who ca
On Thu, 21 Dec 2006, pHilipp Zabel wrote:
> > > --- linux-2.6.orig/arch/arm/mach-pxa/generic.c2006-12-16
> > > +++ linux-2.6/arch/arm/mach-pxa/generic.c 2006-12-16
> > > 16:47:45.0
> > > @@ -129,6 +129,29 @@
> > > EXPORT_SYMBOL(pxa_gpio_mode);
> > >
> > > /*
> > > + * Return GP
On 12/21/06, Nicolas Pitre <[EMAIL PROTECTED]> wrote:
On Thu, 21 Dec 2006, pHilipp Zabel wrote:
> David suggested to have both inline and non-inline functions depending
> on whether gpio is constant. How is this patch?
More comments below.
> --- /dev/null 1970-01-01 00:00:00.0 +
>
On Thursday 21 December 2006 7:03 am, pHilipp Zabel wrote:
> On 12/21/06, Nicolas Pitre <[EMAIL PROTECTED]> wrote:
> +static inline void __gpio_set_value(unsigned gpio, int value)
> +{
> + if (value)
> + GPSR(gpio) = GPIO_bit(gpio);
> + else
> + GPCR(gpio) = GPIO_bi
On Thu, 21 Dec 2006, pHilipp Zabel wrote:
> David suggested to have both inline and non-inline functions depending
> on whether gpio is constant. How is this patch?
More comments below.
> --- /dev/null 1970-01-01 00:00:00.0 +
> +++ linux-2.6/include/asm-arm/arch-pxa/gpio.h 2006-12-21
On 12/21/06, Nicolas Pitre <[EMAIL PROTECTED]> wrote:
On Wed, 20 Dec 2006, David Brownell wrote:
> On Wednesday 20 December 2006 10:12 pm, Andrew Morton wrote:
> > Why not implement them as inline functions?
>
> I just collected and forwarded the code from Philip...
> the better not to lose such
On Wed, 20 Dec 2006, David Brownell wrote:
> On Wednesday 20 December 2006 10:12 pm, Andrew Morton wrote:
> > Why not implement them as inline functions?
>
> I just collected and forwarded the code from Philip...
> the better not to lose such stuff! :)
>
>
> > Or non-inline functions, come to
On Wednesday 20 December 2006 10:12 pm, Andrew Morton wrote:
> On Wed, 20 Dec 2006 13:12:35 -0800
> David Brownell <[EMAIL PROTECTED]> wrote:
>
> > +/* REVISIT these macros are correct, but suffer code explosion
> > + * for non-constant parameters. Provide out-line versions too.
> > + */
> > +#de
On Wed, 20 Dec 2006 13:12:35 -0800
David Brownell <[EMAIL PROTECTED]> wrote:
> +/* REVISIT these macros are correct, but suffer code explosion
> + * for non-constant parameters. Provide out-line versions too.
> + */
> +#define gpio_get_value(gpio) \
> + (GPLR(gpio) & GPIO_bit(gpio))
> +
> +#d
19 matches
Mail list logo