From 22fe67837614469f8e86c97e9e43d46270701b33 Mon Sep 17 00:00:00 2001 From: Russell King Date: Tue, 26 Jul 2011 11:04:51 +0100 Subject: ARM: gpio: consolidate trivial gpiolib implementations 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 Acked-by: H Hartley Sweeten Tested-by: David Brown Acked-by: David Brown Tested-by: Linus Walleij Acked-by: Kukjin Kim Tested-by: Shawn Guo Signed-off-by: Russell King --- arch/arm/mach-s3c64xx/include/mach/gpio.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'arch/arm/mach-s3c64xx') diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio.h b/arch/arm/mach-s3c64xx/include/mach/gpio.h index 0d46e994048a..6958b3fe5255 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 -- cgit v1.2.3 From 01e7dc89d060413fd639635618de506093730964 Mon Sep 17 00:00:00 2001 From: Russell King Date: Tue, 26 Jul 2011 11:29:42 +0100 Subject: ARM: gpio: consolidate gpio_to_irq Many of the gpio_to_irq implementations use the gpiolib version of this function. Provide the standard gpiolib gpio_to_irq() for everyone, but allow platforms to override it if they wish. Add the neccessary overrides for those platforms which do not use the standard definition. Acked-by: Kukjin Kim Signed-off-by: Russell King --- arch/arm/mach-s3c64xx/include/mach/gpio.h | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm/mach-s3c64xx') diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio.h b/arch/arm/mach-s3c64xx/include/mach/gpio.h index 6958b3fe5255..3a8857c68e4d 100644 --- a/arch/arm/mach-s3c64xx/include/mach/gpio.h +++ b/arch/arm/mach-s3c64xx/include/mach/gpio.h @@ -13,7 +13,6 @@ */ #define __ARM_GPIOLIB_TRIVIAL -#define gpio_to_irq __gpio_to_irq /* GPIO bank sizes */ #define S3C64XX_GPIO_A_NR (8) -- cgit v1.2.3 From 8f3c4537bb08001c4772d66ad3fcfcf24d8d180d Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 8 Aug 2011 13:58:28 +0100 Subject: ARM: gpio: make trivial GPIOLIB implementation the default Rather than marking the mach/gpio.h header files which want to use the trivial GPIOLIB implementation, mark those which do not want to use it instead. This means that by default, you get the trivial implementation and only have to do something extra if you need to. This should encourage the use of the trivial default implementation. As an additional bonus, several gpio.h header files become empty. Acked-by: H Hartley Sweeten Tested-by: Jamie Iles Acked-by: Kukjin Kim Signed-off-by: Russell King --- arch/arm/mach-s3c64xx/include/mach/gpio.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/arm/mach-s3c64xx') diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio.h b/arch/arm/mach-s3c64xx/include/mach/gpio.h index 3a8857c68e4d..6e34c2f6e670 100644 --- a/arch/arm/mach-s3c64xx/include/mach/gpio.h +++ b/arch/arm/mach-s3c64xx/include/mach/gpio.h @@ -12,8 +12,6 @@ * published by the Free Software Foundation. */ -#define __ARM_GPIOLIB_TRIVIAL - /* GPIO bank sizes */ #define S3C64XX_GPIO_A_NR (8) #define S3C64XX_GPIO_B_NR (7) -- cgit v1.2.3