Re: [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations

2011-08-29 Thread Kevin Hilman
Russell King - ARM Linux li...@arm.linux.org.uk writes:

 Consolidate 24 trivial gpiolib implementions out of mach/gpio.h
 into asm/gpio.h.  This is basically the include of asm-generic/gpio.h
 and the definition of gpio_get_value, gpio_set_value, and gpio_cansleep
 as described in Documentation/gpio.txt

 Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk

For OMAP:

Tested-by: Kevin Hilman khil...@ti.com
Acked-by: Kevin Hilman khil...@ti.com

Also goes for patches 12  13 also.

Kevin
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations

2011-08-11 Thread Kukjin Kim
Russell King - ARM Linux wrote:
 
 Consolidate 24 trivial gpiolib implementions out of mach/gpio.h
 into asm/gpio.h.  This is basically the include of asm-generic/gpio.h
 and the definition of gpio_get_value, gpio_set_value, and gpio_cansleep
 as described in Documentation/gpio.txt
 
 Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk

Acked-by: Kukjin Kim kgene@samsung.com
on following Samsung stuff...

As a note, there were duplicated e-mail address Grant and Nicolas in Cc ;)
I just pushed 'reply all' :)

Thanks.

Best regards,
Kgene.
--
Kukjin Kim kgene@samsung.com, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

 ---
  arch/arm/include/asm/gpio.h |   10 ++
...
  arch/arm/mach-exynos4/include/mach/gpio.h   |5 +
...
  arch/arm/mach-s3c2410/include/mach/gpio.h   |5 +
  arch/arm/mach-s3c64xx/include/mach/gpio.h   |6 +-
  arch/arm/mach-s5p64x0/include/mach/gpio.h   |6 +-
  arch/arm/mach-s5pc100/include/mach/gpio.h   |6 +-
  arch/arm/mach-s5pv210/include/mach/gpio.h   |6 +-
 
 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
 +
  #endif /* _ARCH_ARM_GPIO_H */
 diff --git a/arch/arm/mach-exynos4/include/mach/gpio.h b/arch/arm/mach-
 exynos4/include/mach/gpio.h
 index be9266b..b2e3595 100644
 --- a/arch/arm/mach-exynos4/include/mach/gpio.h
 +++ b/arch/arm/mach-exynos4/include/mach/gpio.h
 @@ -13,9 +13,6 @@
  #ifndef __ASM_ARCH_GPIO_H
  #define __ASM_ARCH_GPIO_H __FILE__
 
 -#define gpio_get_value   __gpio_get_value
 -#define gpio_set_value   __gpio_set_value
 -#define gpio_cansleep__gpio_cansleep
  #define gpio_to_irq  __gpio_to_irq
 
  /* Practically, GPIO banks up to GPZ are the configurable gpio banks */
 @@ -151,6 +148,6 @@ enum s5p_gpio_number {
  #define ARCH_NR_GPIOS
   (EXYNOS4_GPZ(EXYNOS4_GPIO_Z_NR) +   \
CONFIG_SAMSUNG_GPIO_EXTRA + 1)
 
 -#include asm-generic/gpio.h
 +#define __ARM_GPIOLIB_TRIVIAL
 
  #endif /* __ASM_ARCH_GPIO_H */

 diff --git a/arch/arm/mach-s3c2410/include/mach/gpio.h b/arch/arm/mach-
 s3c2410/include/mach/gpio.h
 index f7f6b07..998ef4c 100644
 --- a/arch/arm/mach-s3c2410/include/mach/gpio.h
 +++ b/arch/arm/mach-s3c2410/include/mach/gpio.h
 @@ -11,9 +11,7 @@
   * published by the Free Software Foundation.
  */
 
 -#define gpio_get_value   __gpio_get_value
 -#define gpio_set_value   __gpio_set_value
 -#define gpio_cansleep__gpio_cansleep
 +#define __ARM_GPIOLIB_TRIVIAL
  #define gpio_to_irq  __gpio_to_irq
 
  /* some boards require extra gpio capacity to support external
 @@ -28,7 +26,6 @@
  #define ARCH_NR_GPIOS(256 + CONFIG_S3C24XX_GPIO_EXTRA)
  #endif
 
 -#include asm-generic/gpio.h
  #include mach/gpio-nrs.h
  #include mach/gpio-fns.h
 
 diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio.h b/arch/arm/mach-
 s3c64xx/include/mach/gpio.h
 index 0d46e99..6958b3f 100644
 --- a/arch/arm/mach-s3c64xx/include/mach/gpio.h
 +++ b/arch/arm/mach-s3c64xx/include/mach/gpio.h
 @@ -12,9 +12,7 @@
   * published by the Free Software Foundation.
  */
 
 -#define gpio_get_value   __gpio_get_value
 -#define gpio_set_value   __gpio_set_value
 -#define gpio_cansleep__gpio_cansleep
 +#define __ARM_GPIOLIB_TRIVIAL
  #define gpio_to_irq  __gpio_to_irq
 
  /* GPIO bank sizes */
 @@ -96,5 +94,3 @@ enum s3c_gpio_number {
  #define BOARD_NR_GPIOS 16
 
  #define ARCH_NR_GPIOS(GPIO_BOARD_START + BOARD_NR_GPIOS)
 -
 -#include asm-generic/gpio.h
 diff --git a/arch/arm/mach-s5p64x0/include/mach/gpio.h b/arch/arm/mach-
 s5p64x0/include/mach/gpio.h
 index adb5f29..a25160b 100644
 --- a/arch/arm/mach-s5p64x0/include/mach/gpio.h
 +++ b/arch/arm/mach-s5p64x0/include/mach/gpio.h
 @@ -13,9 +13,7 @@
  #ifndef __ASM_ARCH_GPIO_H
  #define __ASM_ARCH_GPIO_H __FILE__
 
 -#define gpio_get_value   __gpio_get_value
 -#define gpio_set_value   __gpio_set_value
 -#define gpio_cansleep__gpio_cansleep
 +#define __ARM_GPIOLIB_TRIVIAL
  #define gpio_to_irq  __gpio_to_irq
 
  /* GPIO bank sizes */
 @@ -134,6 +132,4 @@ enum s5p6450_gpio_number {
 
  #define ARCH_NR_GPIOS(S5P64X0_GPIO_END +
 CONFIG_SAMSUNG_GPIO_EXTRA)
 
 -#include asm-generic/gpio.h
 -
  #endif /* __ASM_ARCH_GPIO_H */
 diff --git a/arch/arm/mach-s5pc100/include/mach/gpio.h b/arch/arm/mach-
 s5pc100/include/mach/gpio.h
 index 29a8a12..f515bfb 100644
 --- 

Re: [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations

2011-08-11 Thread Felipe Balbi
On Tue, Aug 09, 2011 at 09:08:01AM +0100, Russell King - ARM Linux wrote:
 Consolidate 24 trivial gpiolib implementions out of mach/gpio.h
 into asm/gpio.h.  This is basically the include of asm-generic/gpio.h
 and the definition of gpio_get_value, gpio_set_value, and gpio_cansleep
 as described in Documentation/gpio.txt
 
 Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
 ---
  arch/arm/include/asm/gpio.h |   10 ++
  arch/arm/mach-at91/include/mach/gpio.h  |5 +
  arch/arm/mach-ep93xx/include/mach/gpio.h|7 +--
  arch/arm/mach-exynos4/include/mach/gpio.h   |5 +
  arch/arm/mach-gemini/include/mach/gpio.h|5 +
  arch/arm/mach-ks8695/include/mach/gpio.h|   11 ++-
  arch/arm/mach-lpc32xx/include/mach/gpio.h   |   17 +
  arch/arm/mach-msm/include/mach/gpio.h   |5 +
  arch/arm/mach-mxs/include/mach/gpio.h   |6 +-
  arch/arm/mach-realview/include/mach/gpio.h  |6 +-
  arch/arm/mach-s3c2410/include/mach/gpio.h   |5 +
  arch/arm/mach-s3c64xx/include/mach/gpio.h   |6 +-
  arch/arm/mach-s5p64x0/include/mach/gpio.h   |6 +-
  arch/arm/mach-s5pc100/include/mach/gpio.h   |6 +-
  arch/arm/mach-s5pv210/include/mach/gpio.h   |6 +-
  arch/arm/mach-shmobile/include/mach/gpio.h  |   15 +--
  arch/arm/mach-tegra/include/mach/gpio.h |6 +-
  arch/arm/mach-versatile/include/mach/gpio.h |6 +-
  arch/arm/mach-vt8500/include/mach/gpio.h|6 +-
  arch/arm/mach-w90x900/include/mach/gpio.h   |5 +
  arch/arm/plat-mxc/include/mach/gpio.h   |5 +
  arch/arm/plat-nomadik/include/plat/gpio.h   |   11 +--
  arch/arm/plat-omap/include/plat/gpio.h  |   15 +--
  arch/arm/plat-orion/include/plat/gpio.h |6 ++
  arch/arm/plat-spear/include/plat/gpio.h |6 +-
  25 files changed, 36 insertions(+), 151 deletions(-)
 
 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 ?

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations

2011-08-11 Thread Russell King - ARM Linux
On Thu, Aug 11, 2011 at 08:47:18PM +0900, Kukjin Kim wrote:
 Russell King - ARM Linux wrote:
  
  Consolidate 24 trivial gpiolib implementions out of mach/gpio.h
  into asm/gpio.h.  This is basically the include of asm-generic/gpio.h
  and the definition of gpio_get_value, gpio_set_value, and gpio_cansleep
  as described in Documentation/gpio.txt
  
  Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
 
 Acked-by: Kukjin Kim kgene@samsung.com
 on following Samsung stuff...

Thanks.

 As a note, there were duplicated e-mail address Grant and Nicolas in Cc ;)
 I just pushed 'reply all' :)

That's not in the original email, and isn't in any one elses replies
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations

2011-08-11 Thread Russell King - ARM Linux
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...)
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations

2011-08-11 Thread David Brown
On Thu, Aug 11, 2011 at 04:08:07PM +0100, Russell King - ARM Linux wrote:

  As a note, there were duplicated e-mail address Grant and Nicolas in Cc ;)
  I just pushed 'reply all' :)
 
 That's not in the original email, and isn't in any one elses replies

The original patches have a doubled CC line.  I think most mailers
eliminate the duplicates, though.

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations

2011-08-11 Thread Felipe Balbi
Hi,

On Thu, Aug 11, 2011 at 04:07:18PM +0100, Russell King - ARM Linux wrote:
 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...)

Ok, I understand.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations

2011-08-10 Thread Linus Walleij
2011/8/9 Russell King - ARM Linux li...@arm.linux.org.uk:

 Consolidate 24 trivial gpiolib implementions out of mach/gpio.h
 into asm/gpio.h.  This is basically the include of asm-generic/gpio.h
 and the definition of gpio_get_value, gpio_set_value, and gpio_cansleep
 as described in Documentation/gpio.txt

 Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk

reaks compile of plat-nomadik due to missing u32, feel free to fold in
the below fix. With that it's
Tested-by: Linus Walleij linus.wall...@linaro.org
for Nomadik, U300 and Ux500.

From 2e4496fc7643d804ccf50a8efe1a0304210176d1 Mon Sep 17 00:00:00 2001
From: Linus Walleij linus.wall...@linaro.org
Date: Wed, 10 Aug 2011 09:51:16 +0200
Subject: [PATCH] plat-nomadik: small fixup for gpio.h

Removing the generic gpio.h broke compilation of the Nomadik
GPIO driver since it implicitly got u32 from it. Explicitly
include linux/kernel.h so we get u32 defined.

Signed-off-by: Linus Walleij linus.wall...@linaro.org
---
 arch/arm/plat-nomadik/include/plat/gpio.h |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-nomadik/include/plat/gpio.h
b/arch/arm/plat-nomadik/include/plat/gpio.h
index cf0b78b..b894a53 100644
--- a/arch/arm/plat-nomadik/include/plat/gpio.h
+++ b/arch/arm/plat-nomadik/include/plat/gpio.h
@@ -12,6 +12,8 @@
 #ifndef __ASM_PLAT_GPIO_H
 #define __ASM_PLAT_GPIO_H

+#include linux/kernel.h
+
 /*
  * nmk_gpio and NMK_GPIO stand for Nomadik GPIO, leaving
  * the gpio namespace for generic and cross-machine functions
-- 
1.7.3.2

Thanks,
Linus Walleij
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html