All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib
Date: Thu, 11 Aug 2011 15:07:18 +0000	[thread overview]
Message-ID: <20110811150718.GA4924@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20110811141528.GL28500@legolas.emea.dhcp.ti.com>

On Thu, Aug 11, 2011 at 05:15:31PM +0300, Felipe Balbi wrote:
> On Tue, Aug 09, 2011 at 09:08:01AM +0100, Russell King - ARM Linux wrote:
> > diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
> > index 166a7a3..15e8970 100644
> > --- a/arch/arm/include/asm/gpio.h
> > +++ b/arch/arm/include/asm/gpio.h
> > @@ -4,4 +4,14 @@
> >  /* not all ARM platforms necessarily support this API ... */
> >  #include <mach/gpio.h>
> >  
> > +#ifdef __ARM_GPIOLIB_TRIVIAL
> > +/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
> > +#include <asm-generic/gpio.h>
> > +
> > +/* The trivial gpiolib dispatchers */
> > +#define gpio_get_value  __gpio_get_value
> > +#define gpio_set_value  __gpio_set_value
> > +#define gpio_cansleep   __gpio_cansleep
> > +#endif
> 
> could that be a selectable symbol ? Something like:
> 
> CONFIG_HAS_ARM_TRIVIAL_GPIO
> 
> then on Kconfig you just:
> 
> select HAS_ARM_TIVIAL_GPIO or something ?

That makes things more complicated, because that involves digging through
a lot of platform code in a couple of places to work out exactly when we
need this - and it crosses the boundary to arch/sh too.

So I'd prefer to keep this simple.

The long-term goal is to remove that symbol entirely, but in order to do
that we need to kill of the "optimized" on-board SoC stuff in those (few)
gpio.h which don't have the symbol selected.  This is rather necessary to
progress towards the consolidated kernel.  (Re-inventing gpiolib by moving
them out of line isn't a good idea...)

WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Felipe Balbi <balbi@ti.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-sh@vger.kernel.org, linux-tegra@vger.kernel.org,
	Grant Likely <grant.likely@secretlab.ca>,
	Nicolas Pitre <nico@fluxnic.net>
Subject: Re: [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations
Date: Thu, 11 Aug 2011 16:07:18 +0100	[thread overview]
Message-ID: <20110811150718.GA4924@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20110811141528.GL28500@legolas.emea.dhcp.ti.com>

On Thu, Aug 11, 2011 at 05:15:31PM +0300, Felipe Balbi wrote:
> On Tue, Aug 09, 2011 at 09:08:01AM +0100, Russell King - ARM Linux wrote:
> > diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
> > index 166a7a3..15e8970 100644
> > --- a/arch/arm/include/asm/gpio.h
> > +++ b/arch/arm/include/asm/gpio.h
> > @@ -4,4 +4,14 @@
> >  /* not all ARM platforms necessarily support this API ... */
> >  #include <mach/gpio.h>
> >  
> > +#ifdef __ARM_GPIOLIB_TRIVIAL
> > +/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
> > +#include <asm-generic/gpio.h>
> > +
> > +/* The trivial gpiolib dispatchers */
> > +#define gpio_get_value  __gpio_get_value
> > +#define gpio_set_value  __gpio_set_value
> > +#define gpio_cansleep   __gpio_cansleep
> > +#endif
> 
> could that be a selectable symbol ? Something like:
> 
> CONFIG_HAS_ARM_TRIVIAL_GPIO
> 
> then on Kconfig you just:
> 
> select HAS_ARM_TIVIAL_GPIO or something ?

That makes things more complicated, because that involves digging through
a lot of platform code in a couple of places to work out exactly when we
need this - and it crosses the boundary to arch/sh too.

So I'd prefer to keep this simple.

The long-term goal is to remove that symbol entirely, but in order to do
that we need to kill of the "optimized" on-board SoC stuff in those (few)
gpio.h which don't have the symbol selected.  This is rather necessary to
progress towards the consolidated kernel.  (Re-inventing gpiolib by moving
them out of line isn't a good idea...)

WARNING: multiple messages have this Message-ID (diff)
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations
Date: Thu, 11 Aug 2011 16:07:18 +0100	[thread overview]
Message-ID: <20110811150718.GA4924@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20110811141528.GL28500@legolas.emea.dhcp.ti.com>

On Thu, Aug 11, 2011 at 05:15:31PM +0300, Felipe Balbi wrote:
> On Tue, Aug 09, 2011 at 09:08:01AM +0100, Russell King - ARM Linux wrote:
> > diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
> > index 166a7a3..15e8970 100644
> > --- a/arch/arm/include/asm/gpio.h
> > +++ b/arch/arm/include/asm/gpio.h
> > @@ -4,4 +4,14 @@
> >  /* not all ARM platforms necessarily support this API ... */
> >  #include <mach/gpio.h>
> >  
> > +#ifdef __ARM_GPIOLIB_TRIVIAL
> > +/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
> > +#include <asm-generic/gpio.h>
> > +
> > +/* The trivial gpiolib dispatchers */
> > +#define gpio_get_value  __gpio_get_value
> > +#define gpio_set_value  __gpio_set_value
> > +#define gpio_cansleep   __gpio_cansleep
> > +#endif
> 
> could that be a selectable symbol ? Something like:
> 
> CONFIG_HAS_ARM_TRIVIAL_GPIO
> 
> then on Kconfig you just:
> 
> select HAS_ARM_TIVIAL_GPIO or something ?

That makes things more complicated, because that involves digging through
a lot of platform code in a couple of places to work out exactly when we
need this - and it crosses the boundary to arch/sh too.

So I'd prefer to keep this simple.

The long-term goal is to remove that symbol entirely, but in order to do
that we need to kill of the "optimized" on-board SoC stuff in those (few)
gpio.h which don't have the symbol selected.  This is rather necessary to
progress towards the consolidated kernel.  (Re-inventing gpiolib by moving
them out of line isn't a good idea...)

  reply	other threads:[~2011-08-11 15:07 UTC|newest]

Thread overview: 114+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-09  8:04 [PATCH 00/13] Clean up mach/gpio.h headers Russell King - ARM Linux
2011-08-09  8:04 ` Russell King - ARM Linux
2011-08-09  8:04 ` Russell King - ARM Linux
2011-08-09  8:04 ` [PATCH 01/13] ARM: gpio: at91: remove redundant include of Russell King - ARM Linux
2011-08-09  8:04   ` [PATCH 01/13] ARM: gpio: at91: remove redundant include of mach/gpio.h Russell King - ARM Linux
2011-08-09  8:04   ` Russell King - ARM Linux
2011-08-09  8:05 ` [PATCH 02/13] ARM: gpio: convert includes of mach/gpio.h and Russell King - ARM Linux
2011-08-09  8:05   ` [PATCH 02/13] ARM: gpio: convert includes of mach/gpio.h and asm/gpio.h to linux/gpio.h Russell King - ARM Linux
2011-08-09  8:05   ` Russell King - ARM Linux
2011-08-09  8:05 ` [PATCH 03/13] ARM: gpio: omap: convert drivers to use asm/gpio.h Russell King - ARM Linux
2011-08-09  8:05   ` [PATCH 03/13] ARM: gpio: omap: convert drivers to use asm/gpio.h rather than mach/gpio.h Russell King - ARM Linux
2011-08-09  8:05   ` Russell King - ARM Linux
2011-08-29 18:20   ` Kevin Hilman
2011-08-29 18:20     ` Kevin Hilman
2011-08-29 18:20     ` Kevin Hilman
2011-08-09  8:05 ` [PATCH 04/13] ARM: gpio: at91: convert drivers to use asm/gpio.h Russell King - ARM Linux
2011-08-09  8:05   ` [PATCH 04/13] ARM: gpio: at91: convert drivers to use asm/gpio.h rather than mach/gpio.h Russell King - ARM Linux
2011-08-09  8:05   ` Russell King - ARM Linux
2011-08-09  8:06 ` [PATCH 05/13] ARM: gpio: nomadik: convert drivers to use asm/gpio.h Russell King - ARM Linux
2011-08-09  8:06   ` [PATCH 05/13] ARM: gpio: nomadik: convert drivers to use asm/gpio.h rather than mach/gpio.h Russell King - ARM Linux
2011-08-09  8:06   ` Russell King - ARM Linux
2011-08-09  8:06 ` [PATCH 06/13] ARM: gpio: davinci: convert drivers to use asm/gpio.h Russell King - ARM Linux
2011-08-09  8:06   ` [PATCH 06/13] ARM: gpio: davinci: convert drivers to use asm/gpio.h rather than mach/gpio.h Russell King - ARM Linux
2011-08-09  8:06   ` Russell King - ARM Linux
2011-08-09 12:06   ` [PATCH 06/13] ARM: gpio: davinci: convert drivers to use asm/gpio.h Sergei Shtylyov
2011-08-09 12:06     ` [PATCH 06/13] ARM: gpio: davinci: convert drivers to use asm/gpio.h rather than mach/gpio.h Sergei Shtylyov
2011-08-09 12:06     ` Sergei Shtylyov
2011-08-09 19:45     ` [PATCH 06/13] ARM: gpio: davinci: convert drivers to use Russell King - ARM Linux
2011-08-09 19:45       ` [PATCH 06/13] ARM: gpio: davinci: convert drivers to use asm/gpio.h rather than mach/gpio.h Russell King - ARM Linux
2011-08-09 19:45       ` Russell King - ARM Linux
2011-08-09  8:06 ` [PATCH 07/13] ARM: gpio: pnx4008: convert drivers to use asm/gpio.h Russell King - ARM Linux
2011-08-09  8:06   ` [PATCH 07/13] ARM: gpio: pnx4008: convert drivers to use asm/gpio.h rather than mach/gpio.h Russell King - ARM Linux
2011-08-09  8:06   ` Russell King - ARM Linux
2011-08-09  8:07 ` [PATCH 08/13] ARM: gpio: ixp2000: convert drivers to use asm/gpio.h Russell King - ARM Linux
2011-08-09  8:07   ` [PATCH 08/13] ARM: gpio: ixp2000: convert drivers to use asm/gpio.h rather than mach/gpio.h Russell King - ARM Linux
2011-08-09  8:07   ` Russell King - ARM Linux
2011-08-09  8:07 ` [PATCH 09/13] ARM: gpio: tegra: convert drivers to use asm/gpio.h Russell King - ARM Linux
2011-08-09  8:07   ` [PATCH 09/13] ARM: gpio: tegra: convert drivers to use asm/gpio.h rather than mach/gpio.h Russell King - ARM Linux
2011-08-09  8:07   ` Russell King - ARM Linux
2011-08-09  8:07 ` [PATCH 10/13] ARM: gpio: pxa: convert drivers to use asm/gpio.h Russell King - ARM Linux
2011-08-09  8:07   ` [PATCH 10/13] ARM: gpio: pxa: convert drivers to use asm/gpio.h rather than mach/gpio.h Russell King - ARM Linux
2011-08-09  8:07   ` Russell King - ARM Linux
2011-08-09  8:08 ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations Russell King - ARM Linux
2011-08-09  8:08   ` Russell King - ARM Linux
2011-08-09  8:08   ` Russell King - ARM Linux
2011-08-09 17:02   ` H Hartley Sweeten
2011-08-09 17:02   ` H Hartley Sweeten
2011-08-09 17:02   ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib H Hartley Sweeten
2011-08-09 17:02     ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations H Hartley Sweeten
2011-08-09 17:02     ` H Hartley Sweeten
2011-08-09 17:02   ` H Hartley Sweeten
2011-08-09 17:59   ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib David Brown
2011-08-09 17:59     ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations David Brown
2011-08-09 17:59     ` David Brown
2011-08-10  7:54   ` Linus Walleij
2011-08-10  7:54     ` Linus Walleij
2011-08-10  7:54     ` Linus Walleij
     [not found]   ` <E1QqhM1-0003af-U5-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2011-08-11 11:47     ` Kukjin Kim
2011-08-11 11:47   ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib Kukjin Kim
2011-08-11 11:47     ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations Kukjin Kim
2011-08-11 11:47     ` Kukjin Kim
2011-08-11 15:08     ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib Russell King - ARM Linux
2011-08-11 15:08       ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations Russell King - ARM Linux
2011-08-11 15:08       ` Russell King - ARM Linux
2011-08-11 16:24       ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib David Brown
2011-08-11 16:24         ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations David Brown
2011-08-11 16:24         ` David Brown
2011-08-11 14:15   ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib Felipe Balbi
2011-08-11 14:15     ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations Felipe Balbi
2011-08-11 14:15     ` Felipe Balbi
2011-08-11 15:07     ` Russell King - ARM Linux [this message]
2011-08-11 15:07       ` Russell King - ARM Linux
2011-08-11 15:07       ` Russell King - ARM Linux
2011-08-11 18:50       ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib Felipe Balbi
2011-08-11 18:50         ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations Felipe Balbi
2011-08-11 18:50         ` Felipe Balbi
2011-08-12  5:54   ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib Shawn Guo
2011-08-12  5:54     ` [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations Shawn Guo
2011-08-12  5:54     ` Shawn Guo
2011-08-29 18:23   ` Kevin Hilman
2011-08-29 18:23     ` Kevin Hilman
2011-08-29 18:23     ` Kevin Hilman
2011-08-09  8:08 ` [PATCH 12/13] ARM: gpio: consolidate gpio_to_irq Russell King - ARM Linux
2011-08-09  8:08   ` Russell King - ARM Linux
2011-08-09  8:08   ` Russell King - ARM Linux
     [not found]   ` <E1QqhMM-0003aj-C7-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2011-08-11 11:58     ` Kukjin Kim
2011-08-11 11:58   ` Kukjin Kim
2011-08-11 11:58     ` Kukjin Kim
2011-08-11 11:58     ` Kukjin Kim
2011-08-09  8:08 ` [PATCH 13/13] ARM: gpio: make trivial GPIOLIB implementation the Russell King - ARM Linux
2011-08-09  8:08   ` [PATCH 13/13] ARM: gpio: make trivial GPIOLIB implementation the default Russell King - ARM Linux
2011-08-09  8:08   ` Russell King - ARM Linux
2011-08-09 17:04   ` H Hartley Sweeten
2011-08-09 17:04   ` H Hartley Sweeten
2011-08-09 17:04   ` [PATCH 13/13] ARM: gpio: make trivial GPIOLIB implementation H Hartley Sweeten
2011-08-09 17:04     ` [PATCH 13/13] ARM: gpio: make trivial GPIOLIB implementation the default H Hartley Sweeten
2011-08-09 17:04   ` H Hartley Sweeten
     [not found]   ` <E1QqhMg-0003an-GW-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2011-08-09 17:04     ` H Hartley Sweeten
2011-08-11 12:02     ` Kukjin Kim
2011-08-11 12:02   ` [PATCH 13/13] ARM: gpio: make trivial GPIOLIB implementation the Kukjin Kim
2011-08-11 12:02     ` [PATCH 13/13] ARM: gpio: make trivial GPIOLIB implementation the default Kukjin Kim
2011-08-11 12:02     ` Kukjin Kim
2011-08-09  9:58 ` [PATCH 00/13] Clean up mach/gpio.h headers Jamie Iles
2011-08-09  9:58   ` Jamie Iles
2011-08-09  9:58   ` Jamie Iles
2011-08-09 21:00 ` Grant Likely
2011-08-09 21:00   ` Grant Likely
2011-08-09 21:00   ` Grant Likely
2011-08-09 21:32   ` Russell King - ARM Linux
2011-08-09 21:32     ` Russell King - ARM Linux
2011-08-09 21:32     ` Russell King - ARM Linux
2011-08-09 21:50     ` Grant Likely
2011-08-09 21:50       ` Grant Likely
2011-08-09 21:50       ` Grant Likely

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=20110811150718.GA4924@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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.