aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-24 17:01:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-24 17:01:46 -0400
commitb1bf7d4d1b3911352cf1ec63c1de06214288ccd0 (patch)
tree0fd27c638977cb5c7e6e3f95085ce842b57a4ae3 /arch
parent0708500d49e8439d9fe5529795bdc1485f0f46c3 (diff)
parent3e11f7b840b4671213c66817294ad7dd0b572756 (diff)
Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6
Pull GPIO driver changes from Grant Likely: "Lots of gpio changes, both to core code and drivers. Changes do touch architecture code to remove the need for separate arm/gpio.h includes in most architectures. Some new drivers are added, and a number of gpio drivers are converted to use irq_domains for gpio inputs used as interrupts. Device tree support has been amended to allow multiple gpio_chips to use the same device tree node. Remaining changes are primarily bug fixes." * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6: (33 commits) gpio/generic: initialize basic_mmio_gpio shadow variables properly gpiolib: Remove 'const' from data argument of gpiochip_find() gpio/rc5t583: add gpio driver for RICOH PMIC RC5T583 gpiolib: quiet gpiochip_add boot message noise gpio: mpc8xxx: Prevent NULL pointer deref in demux handler gpio/lpc32xx: Add device tree support gpio: Adjust of_xlate API to support multiple GPIO chips gpiolib: Implement devm_gpio_request_one() gpio-mcp23s08: dbg_show: fix pullup configuration display Add support for TCA6424A gpio/omap: (re)fix wakeups on level-triggered GPIOs gpio/omap: fix broken context restore for non-OFF mode transitions gpio/omap: fix missing check in *_runtime_suspend() gpio/omap: remove cpu_is_omapxxxx() checks from *_runtime_resume() gpio/omap: remove suspend/resume callbacks gpio/omap: remove retrigger variable in gpio_irq_handler gpio/omap: remove saved_wakeup field from struct gpio_bank gpio/omap: remove suspend_wakeup field from struct gpio_bank gpio/omap: remove saved_fallingdetect, saved_risingdetect gpio/omap: remove virtual_irq_start variable ... Conflicts: drivers/gpio/gpio-samsung.c
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/include/asm/gpio.h59
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/mach-imx/mach-mx35_3ds.c3
-rw-r--r--arch/arm/mach-lpc32xx/include/mach/gpio.h9
-rw-r--r--arch/arm/mach-omap1/gpio15xx.c2
-rw-r--r--arch/arm/mach-omap1/gpio16xx.c5
-rw-r--r--arch/arm/mach-omap1/gpio7xx.c7
-rw-r--r--arch/arm/mach-omap2/gpio.c3
-rw-r--r--arch/arm/plat-omap/include/plat/gpio.h3
-rw-r--r--arch/avr32/Kconfig1
-rw-r--r--arch/blackfin/Kconfig1
-rw-r--r--arch/ia64/include/asm/gpio.h59
-rw-r--r--arch/m68k/Kconfig.cpu1
-rw-r--r--arch/microblaze/include/asm/gpio.h57
-rw-r--r--arch/mips/Kconfig1
-rw-r--r--arch/openrisc/include/asm/gpio.h69
-rw-r--r--arch/powerpc/include/asm/gpio.h57
-rw-r--r--arch/sh/Kconfig1
-rw-r--r--arch/sparc/include/asm/gpio.h40
-rw-r--r--arch/unicore32/Kconfig1
-rw-r--r--arch/x86/include/asm/gpio.h57
-rw-r--r--arch/xtensa/include/asm/gpio.h60
22 files changed, 52 insertions, 445 deletions
diff --git a/arch/alpha/include/asm/gpio.h b/arch/alpha/include/asm/gpio.h
index 7dc6a6343c06..b3799d88ffcf 100644
--- a/arch/alpha/include/asm/gpio.h
+++ b/arch/alpha/include/asm/gpio.h
@@ -1,55 +1,4 @@
1/* 1#ifndef __LINUX_GPIO_H
2 * Generic GPIO API implementation for Alpha. 2#warning Include linux/gpio.h instead of asm/gpio.h
3 * 3#include <linux/gpio.h>
4 * A stright copy of that for PowerPC which was: 4#endif
5 *
6 * Copyright (c) 2007-2008 MontaVista Software, Inc.
7 *
8 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef _ASM_ALPHA_GPIO_H
17#define _ASM_ALPHA_GPIO_H
18
19#include <linux/errno.h>
20#include <asm-generic/gpio.h>
21
22#ifdef CONFIG_GPIOLIB
23
24/*
25 * We don't (yet) implement inlined/rapid versions for on-chip gpios.
26 * Just call gpiolib.
27 */
28static inline int gpio_get_value(unsigned int gpio)
29{
30 return __gpio_get_value(gpio);
31}
32
33static inline void gpio_set_value(unsigned int gpio, int value)
34{
35 __gpio_set_value(gpio, value);
36}
37
38static inline int gpio_cansleep(unsigned int gpio)
39{
40 return __gpio_cansleep(gpio);
41}
42
43static inline int gpio_to_irq(unsigned int gpio)
44{
45 return __gpio_to_irq(gpio);
46}
47
48static inline int irq_to_gpio(unsigned int irq)
49{
50 return -EINVAL;
51}
52
53#endif /* CONFIG_GPIOLIB */
54
55#endif /* _ASM_ALPHA_GPIO_H */
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 312450941a1a..5458aa9db067 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1,6 +1,7 @@
1config ARM 1config ARM
2 bool 2 bool
3 default y 3 default y
4 select ARCH_HAVE_CUSTOM_GPIO_H
4 select HAVE_AOUT 5 select HAVE_AOUT
5 select HAVE_DMA_API_DEBUG 6 select HAVE_DMA_API_DEBUG
6 select HAVE_IDE if PCI || ISA || PCMCIA 7 select HAVE_IDE if PCI || ISA || PCMCIA
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
index 86284bba46d3..28aa19476de7 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -98,8 +98,7 @@ static struct i2c_board_info __initdata i2c_devices_3ds[] = {
98 98
99static int lcd_power_gpio = -ENXIO; 99static int lcd_power_gpio = -ENXIO;
100 100
101static int mc9s08dz60_gpiochip_match(struct gpio_chip *chip, 101static int mc9s08dz60_gpiochip_match(struct gpio_chip *chip, void *data)
102 const void *data)
103{ 102{
104 return !strcmp(chip->label, data); 103 return !strcmp(chip->label, data);
105} 104}
diff --git a/arch/arm/mach-lpc32xx/include/mach/gpio.h b/arch/arm/mach-lpc32xx/include/mach/gpio.h
index 40a8c178f10d..2ba6ca412bef 100644
--- a/arch/arm/mach-lpc32xx/include/mach/gpio.h
+++ b/arch/arm/mach-lpc32xx/include/mach/gpio.h
@@ -1 +1,8 @@
1/* empty */ 1#ifndef __MACH_GPIO_H
2#define __MACH_GPIO_H
3
4#include "gpio-lpc32xx.h"
5
6#define ARCH_NR_GPIOS (LPC32XX_GPO_P3_GRP + LPC32XX_GPO_P3_MAX)
7
8#endif /* __MACH_GPIO_H */
diff --git a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c
index 634903ef8292..ebef15e5e7b7 100644
--- a/arch/arm/mach-omap1/gpio15xx.c
+++ b/arch/arm/mach-omap1/gpio15xx.c
@@ -46,7 +46,6 @@ static struct omap_gpio_reg_offs omap15xx_mpuio_regs = {
46}; 46};
47 47
48static struct __initdata omap_gpio_platform_data omap15xx_mpu_gpio_config = { 48static struct __initdata omap_gpio_platform_data omap15xx_mpu_gpio_config = {
49 .virtual_irq_start = IH_MPUIO_BASE,
50 .is_mpuio = true, 49 .is_mpuio = true,
51 .bank_width = 16, 50 .bank_width = 16,
52 .bank_stride = 1, 51 .bank_stride = 1,
@@ -89,7 +88,6 @@ static struct omap_gpio_reg_offs omap15xx_gpio_regs = {
89}; 88};
90 89
91static struct __initdata omap_gpio_platform_data omap15xx_gpio_config = { 90static struct __initdata omap_gpio_platform_data omap15xx_gpio_config = {
92 .virtual_irq_start = IH_GPIO_BASE,
93 .bank_width = 16, 91 .bank_width = 16,
94 .regs = &omap15xx_gpio_regs, 92 .regs = &omap15xx_gpio_regs,
95}; 93};
diff --git a/arch/arm/mach-omap1/gpio16xx.c b/arch/arm/mach-omap1/gpio16xx.c
index 1fb3b9ad496e..2a48cd2e1754 100644
--- a/arch/arm/mach-omap1/gpio16xx.c
+++ b/arch/arm/mach-omap1/gpio16xx.c
@@ -52,7 +52,6 @@ static struct omap_gpio_reg_offs omap16xx_mpuio_regs = {
52}; 52};
53 53
54static struct __initdata omap_gpio_platform_data omap16xx_mpu_gpio_config = { 54static struct __initdata omap_gpio_platform_data omap16xx_mpu_gpio_config = {
55 .virtual_irq_start = IH_MPUIO_BASE,
56 .is_mpuio = true, 55 .is_mpuio = true,
57 .bank_width = 16, 56 .bank_width = 16,
58 .bank_stride = 1, 57 .bank_stride = 1,
@@ -99,7 +98,6 @@ static struct omap_gpio_reg_offs omap16xx_gpio_regs = {
99}; 98};
100 99
101static struct __initdata omap_gpio_platform_data omap16xx_gpio1_config = { 100static struct __initdata omap_gpio_platform_data omap16xx_gpio1_config = {
102 .virtual_irq_start = IH_GPIO_BASE,
103 .bank_width = 16, 101 .bank_width = 16,
104 .regs = &omap16xx_gpio_regs, 102 .regs = &omap16xx_gpio_regs,
105}; 103};
@@ -128,7 +126,6 @@ static struct __initdata resource omap16xx_gpio2_resources[] = {
128}; 126};
129 127
130static struct __initdata omap_gpio_platform_data omap16xx_gpio2_config = { 128static struct __initdata omap_gpio_platform_data omap16xx_gpio2_config = {
131 .virtual_irq_start = IH_GPIO_BASE + 16,
132 .bank_width = 16, 129 .bank_width = 16,
133 .regs = &omap16xx_gpio_regs, 130 .regs = &omap16xx_gpio_regs,
134}; 131};
@@ -157,7 +154,6 @@ static struct __initdata resource omap16xx_gpio3_resources[] = {
157}; 154};
158 155
159static struct __initdata omap_gpio_platform_data omap16xx_gpio3_config = { 156static struct __initdata omap_gpio_platform_data omap16xx_gpio3_config = {
160 .virtual_irq_start = IH_GPIO_BASE + 32,
161 .bank_width = 16, 157 .bank_width = 16,
162 .regs = &omap16xx_gpio_regs, 158 .regs = &omap16xx_gpio_regs,
163}; 159};
@@ -186,7 +182,6 @@ static struct __initdata resource omap16xx_gpio4_resources[] = {
186}; 182};
187 183
188static struct __initdata omap_gpio_platform_data omap16xx_gpio4_config = { 184static struct __initdata omap_gpio_platform_data omap16xx_gpio4_config = {
189 .virtual_irq_start = IH_GPIO_BASE + 48,
190 .bank_width = 16, 185 .bank_width = 16,
191 .regs = &omap16xx_gpio_regs, 186 .regs = &omap16xx_gpio_regs,
192}; 187};
diff --git a/arch/arm/mach-omap1/gpio7xx.c b/arch/arm/mach-omap1/gpio7xx.c
index 4771d6b68b96..acf12b73eace 100644
--- a/arch/arm/mach-omap1/gpio7xx.c
+++ b/arch/arm/mach-omap1/gpio7xx.c
@@ -51,7 +51,6 @@ static struct omap_gpio_reg_offs omap7xx_mpuio_regs = {
51}; 51};
52 52
53static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = { 53static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = {
54 .virtual_irq_start = IH_MPUIO_BASE,
55 .is_mpuio = true, 54 .is_mpuio = true,
56 .bank_width = 16, 55 .bank_width = 16,
57 .bank_stride = 2, 56 .bank_stride = 2,
@@ -93,7 +92,6 @@ static struct omap_gpio_reg_offs omap7xx_gpio_regs = {
93}; 92};
94 93
95static struct __initdata omap_gpio_platform_data omap7xx_gpio1_config = { 94static struct __initdata omap_gpio_platform_data omap7xx_gpio1_config = {
96 .virtual_irq_start = IH_GPIO_BASE,
97 .bank_width = 32, 95 .bank_width = 32,
98 .regs = &omap7xx_gpio_regs, 96 .regs = &omap7xx_gpio_regs,
99}; 97};
@@ -122,7 +120,6 @@ static struct __initdata resource omap7xx_gpio2_resources[] = {
122}; 120};
123 121
124static struct __initdata omap_gpio_platform_data omap7xx_gpio2_config = { 122static struct __initdata omap_gpio_platform_data omap7xx_gpio2_config = {
125 .virtual_irq_start = IH_GPIO_BASE + 32,
126 .bank_width = 32, 123 .bank_width = 32,
127 .regs = &omap7xx_gpio_regs, 124 .regs = &omap7xx_gpio_regs,
128}; 125};
@@ -151,7 +148,6 @@ static struct __initdata resource omap7xx_gpio3_resources[] = {
151}; 148};
152 149
153static struct __initdata omap_gpio_platform_data omap7xx_gpio3_config = { 150static struct __initdata omap_gpio_platform_data omap7xx_gpio3_config = {
154 .virtual_irq_start = IH_GPIO_BASE + 64,
155 .bank_width = 32, 151 .bank_width = 32,
156 .regs = &omap7xx_gpio_regs, 152 .regs = &omap7xx_gpio_regs,
157}; 153};
@@ -180,7 +176,6 @@ static struct __initdata resource omap7xx_gpio4_resources[] = {
180}; 176};
181 177
182static struct __initdata omap_gpio_platform_data omap7xx_gpio4_config = { 178static struct __initdata omap_gpio_platform_data omap7xx_gpio4_config = {
183 .virtual_irq_start = IH_GPIO_BASE + 96,
184 .bank_width = 32, 179 .bank_width = 32,
185 .regs = &omap7xx_gpio_regs, 180 .regs = &omap7xx_gpio_regs,
186}; 181};
@@ -209,7 +204,6 @@ static struct __initdata resource omap7xx_gpio5_resources[] = {
209}; 204};
210 205
211static struct __initdata omap_gpio_platform_data omap7xx_gpio5_config = { 206static struct __initdata omap_gpio_platform_data omap7xx_gpio5_config = {
212 .virtual_irq_start = IH_GPIO_BASE + 128,
213 .bank_width = 32, 207 .bank_width = 32,
214 .regs = &omap7xx_gpio_regs, 208 .regs = &omap7xx_gpio_regs,
215}; 209};
@@ -238,7 +232,6 @@ static struct __initdata resource omap7xx_gpio6_resources[] = {
238}; 232};
239 233
240static struct __initdata omap_gpio_platform_data omap7xx_gpio6_config = { 234static struct __initdata omap_gpio_platform_data omap7xx_gpio6_config = {
241 .virtual_irq_start = IH_GPIO_BASE + 160,
242 .bank_width = 32, 235 .bank_width = 32,
243 .regs = &omap7xx_gpio_regs, 236 .regs = &omap7xx_gpio_regs,
244}; 237};
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c
index a80e093b039f..9ad7d489b0de 100644
--- a/arch/arm/mach-omap2/gpio.c
+++ b/arch/arm/mach-omap2/gpio.c
@@ -56,7 +56,6 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
56 dev_attr = (struct omap_gpio_dev_attr *)oh->dev_attr; 56 dev_attr = (struct omap_gpio_dev_attr *)oh->dev_attr;
57 pdata->bank_width = dev_attr->bank_width; 57 pdata->bank_width = dev_attr->bank_width;
58 pdata->dbck_flag = dev_attr->dbck_flag; 58 pdata->dbck_flag = dev_attr->dbck_flag;
59 pdata->virtual_irq_start = IH_GPIO_BASE + 32 * (id - 1);
60 pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count; 59 pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count;
61 pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL); 60 pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL);
62 if (!pdata->regs) { 61 if (!pdata->regs) {
@@ -103,6 +102,8 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
103 pdata->regs->dataout = OMAP4_GPIO_DATAOUT; 102 pdata->regs->dataout = OMAP4_GPIO_DATAOUT;
104 pdata->regs->set_dataout = OMAP4_GPIO_SETDATAOUT; 103 pdata->regs->set_dataout = OMAP4_GPIO_SETDATAOUT;
105 pdata->regs->clr_dataout = OMAP4_GPIO_CLEARDATAOUT; 104 pdata->regs->clr_dataout = OMAP4_GPIO_CLEARDATAOUT;
105 pdata->regs->irqstatus_raw0 = OMAP4_GPIO_IRQSTATUSRAW0;
106 pdata->regs->irqstatus_raw1 = OMAP4_GPIO_IRQSTATUSRAW1;
106 pdata->regs->irqstatus = OMAP4_GPIO_IRQSTATUS0; 107 pdata->regs->irqstatus = OMAP4_GPIO_IRQSTATUS0;
107 pdata->regs->irqstatus2 = OMAP4_GPIO_IRQSTATUS1; 108 pdata->regs->irqstatus2 = OMAP4_GPIO_IRQSTATUS1;
108 pdata->regs->irqenable = OMAP4_GPIO_IRQSTATUSSET0; 109 pdata->regs->irqenable = OMAP4_GPIO_IRQSTATUSSET0;
diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h
index 2f6e9924a814..50fb7cc000ea 100644
--- a/arch/arm/plat-omap/include/plat/gpio.h
+++ b/arch/arm/plat-omap/include/plat/gpio.h
@@ -172,6 +172,8 @@ struct omap_gpio_reg_offs {
172 u16 clr_dataout; 172 u16 clr_dataout;
173 u16 irqstatus; 173 u16 irqstatus;
174 u16 irqstatus2; 174 u16 irqstatus2;
175 u16 irqstatus_raw0;
176 u16 irqstatus_raw1;
175 u16 irqenable; 177 u16 irqenable;
176 u16 irqenable2; 178 u16 irqenable2;
177 u16 set_irqenable; 179 u16 set_irqenable;
@@ -193,7 +195,6 @@ struct omap_gpio_reg_offs {
193}; 195};
194 196
195struct omap_gpio_platform_data { 197struct omap_gpio_platform_data {
196 u16 virtual_irq_start;
197 int bank_type; 198 int bank_type;
198 int bank_width; /* GPIO bank width */ 199 int bank_width; /* GPIO bank width */
199 int bank_stride; /* Only needed for omap1 MPUIO */ 200 int bank_stride; /* Only needed for omap1 MPUIO */
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index f8bc2d27d148..71d38c76726c 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -11,6 +11,7 @@ config AVR32
11 select GENERIC_ATOMIC64 11 select GENERIC_ATOMIC64
12 select HARDIRQS_SW_RESEND 12 select HARDIRQS_SW_RESEND
13 select GENERIC_IRQ_SHOW 13 select GENERIC_IRQ_SHOW
14 select ARCH_HAVE_CUSTOM_GPIO_H
14 select ARCH_HAVE_NMI_SAFE_CMPXCHG 15 select ARCH_HAVE_NMI_SAFE_CMPXCHG
15 select GENERIC_CLOCKEVENTS 16 select GENERIC_CLOCKEVENTS
16 help 17 help
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 04ec0d8fbbb5..fef96f47876c 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -31,6 +31,7 @@ config BLACKFIN
31 select HAVE_KERNEL_LZO if RAMKERNEL 31 select HAVE_KERNEL_LZO if RAMKERNEL
32 select HAVE_OPROFILE 32 select HAVE_OPROFILE
33 select HAVE_PERF_EVENTS 33 select HAVE_PERF_EVENTS
34 select ARCH_HAVE_CUSTOM_GPIO_H
34 select ARCH_WANT_OPTIONAL_GPIOLIB 35 select ARCH_WANT_OPTIONAL_GPIOLIB
35 select HAVE_GENERIC_HARDIRQS 36 select HAVE_GENERIC_HARDIRQS
36 select GENERIC_ATOMIC64 37 select GENERIC_ATOMIC64
diff --git a/arch/ia64/include/asm/gpio.h b/arch/ia64/include/asm/gpio.h
index 590a20debc4e..b3799d88ffcf 100644
--- a/arch/ia64/include/asm/gpio.h
+++ b/arch/ia64/include/asm/gpio.h
@@ -1,55 +1,4 @@
1/* 1#ifndef __LINUX_GPIO_H
2 * Generic GPIO API implementation for IA-64. 2#warning Include linux/gpio.h instead of asm/gpio.h
3 * 3#include <linux/gpio.h>
4 * A stright copy of that for PowerPC which was: 4#endif
5 *
6 * Copyright (c) 2007-2008 MontaVista Software, Inc.
7 *
8 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef _ASM_IA64_GPIO_H
17#define _ASM_IA64_GPIO_H
18
19#include <linux/errno.h>
20#include <asm-generic/gpio.h>
21
22#ifdef CONFIG_GPIOLIB
23
24/*
25 * We don't (yet) implement inlined/rapid versions for on-chip gpios.
26 * Just call gpiolib.
27 */
28static inline int gpio_get_value(unsigned int gpio)
29{
30 return __gpio_get_value(gpio);
31}
32
33static inline void gpio_set_value(unsigned int gpio, int value)
34{
35 __gpio_set_value(gpio, value);
36}
37
38static inline int gpio_cansleep(unsigned int gpio)
39{
40 return __gpio_cansleep(gpio);
41}
42
43static inline int gpio_to_irq(unsigned int gpio)
44{
45 return __gpio_to_irq(gpio);
46}
47
48static inline int irq_to_gpio(unsigned int irq)
49{
50 return -EINVAL;
51}
52
53#endif /* CONFIG_GPIOLIB */
54
55#endif /* _ASM_IA64_GPIO_H */
diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
index 51b3274cbe71..2b53254ad994 100644
--- a/arch/m68k/Kconfig.cpu
+++ b/arch/m68k/Kconfig.cpu
@@ -24,6 +24,7 @@ config COLDFIRE
24 bool "Coldfire CPU family support" 24 bool "Coldfire CPU family support"
25 select GENERIC_GPIO 25 select GENERIC_GPIO
26 select ARCH_REQUIRE_GPIOLIB 26 select ARCH_REQUIRE_GPIOLIB
27 select ARCH_HAVE_CUSTOM_GPIO_H
27 select CPU_HAS_NO_BITFIELDS 28 select CPU_HAS_NO_BITFIELDS
28 select CPU_HAS_NO_MULDIV64 29 select CPU_HAS_NO_MULDIV64
29 select GENERIC_CSUM 30 select GENERIC_CSUM
diff --git a/arch/microblaze/include/asm/gpio.h b/arch/microblaze/include/asm/gpio.h
index 2b2c18be71c6..b3799d88ffcf 100644
--- a/arch/microblaze/include/asm/gpio.h
+++ b/arch/microblaze/include/asm/gpio.h
@@ -1,53 +1,4 @@
1/* 1#ifndef __LINUX_GPIO_H
2 * Generic GPIO API implementation for PowerPC. 2#warning Include linux/gpio.h instead of asm/gpio.h
3 * 3#include <linux/gpio.h>
4 * Copyright (c) 2007-2008 MontaVista Software, Inc. 4#endif
5 *
6 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 */
13
14#ifndef _ASM_MICROBLAZE_GPIO_H
15#define _ASM_MICROBLAZE_GPIO_H
16
17#include <linux/errno.h>
18#include <asm-generic/gpio.h>
19
20#ifdef CONFIG_GPIOLIB
21
22/*
23 * We don't (yet) implement inlined/rapid versions for on-chip gpios.
24 * Just call gpiolib.
25 */
26static inline int gpio_get_value(unsigned int gpio)
27{
28 return __gpio_get_value(gpio);
29}
30
31static inline void gpio_set_value(unsigned int gpio, int value)
32{
33 __gpio_set_value(gpio, value);
34}
35
36static inline int gpio_cansleep(unsigned int gpio)
37{
38 return __gpio_cansleep(gpio);
39}
40
41static inline int gpio_to_irq(unsigned int gpio)
42{
43 return __gpio_to_irq(gpio);
44}
45
46static inline int irq_to_gpio(unsigned int irq)
47{
48 return -EINVAL;
49}
50
51#endif /* CONFIG_GPIOLIB */
52
53#endif /* _ASM_MICROBLAZE_GPIO_H */
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 3aa826bcbf96..77050671eeef 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -8,6 +8,7 @@ config MIPS
8 select HAVE_PERF_EVENTS 8 select HAVE_PERF_EVENTS
9 select PERF_USE_VMALLOC 9 select PERF_USE_VMALLOC
10 select HAVE_ARCH_KGDB 10 select HAVE_ARCH_KGDB
11 select ARCH_HAVE_CUSTOM_GPIO_H
11 select HAVE_FUNCTION_TRACER 12 select HAVE_FUNCTION_TRACER
12 select HAVE_FUNCTION_TRACE_MCOUNT_TEST 13 select HAVE_FUNCTION_TRACE_MCOUNT_TEST
13 select HAVE_DYNAMIC_FTRACE 14 select HAVE_DYNAMIC_FTRACE
diff --git a/arch/openrisc/include/asm/gpio.h b/arch/openrisc/include/asm/gpio.h
index 0b0d174f47cd..b3799d88ffcf 100644
--- a/arch/openrisc/include/asm/gpio.h
+++ b/arch/openrisc/include/asm/gpio.h
@@ -1,65 +1,4 @@
1/* 1#ifndef __LINUX_GPIO_H
2 * OpenRISC Linux 2#warning Include linux/gpio.h instead of asm/gpio.h
3 * 3#include <linux/gpio.h>
4 * Linux architectural port borrowing liberally from similar works of 4#endif
5 * others. All original copyrights apply as per the original source
6 * declaration.
7 *
8 * OpenRISC implementation:
9 * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>
10 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
11 * et al.
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 */
18
19#ifndef __ASM_OPENRISC_GPIO_H
20#define __ASM_OPENRISC_GPIO_H
21
22#include <linux/errno.h>
23#include <asm-generic/gpio.h>
24
25#ifdef CONFIG_GPIOLIB
26
27/*
28 * OpenRISC (or1k) does not have on-chip GPIO's so there is not really
29 * any standardized implementation that makes sense here. If passing
30 * through gpiolib becomes a bottleneck then it may make sense, on a
31 * case-by-case basis, to implement these inlined/rapid versions.
32 *
33 * Just call gpiolib.
34 */
35static inline int gpio_get_value(unsigned int gpio)
36{
37 return __gpio_get_value(gpio);
38}
39
40static inline void gpio_set_value(unsigned int gpio, int value)
41{
42 __gpio_set_value(gpio, value);
43}
44
45static inline int gpio_cansleep(unsigned int gpio)
46{
47 return __gpio_cansleep(gpio);
48}
49
50/*
51 * Not implemented, yet.
52 */
53static inline int gpio_to_irq(unsigned int gpio)
54{
55 return -ENOSYS;
56}
57
58static inline int irq_to_gpio(unsigned int irq)
59{
60 return -EINVAL;
61}
62
63#endif /* CONFIG_GPIOLIB */
64
65#endif /* __ASM_OPENRISC_GPIO_H */
diff --git a/arch/powerpc/include/asm/gpio.h b/arch/powerpc/include/asm/gpio.h
index 38762edb5e58..b3799d88ffcf 100644
--- a/arch/powerpc/include/asm/gpio.h
+++ b/arch/powerpc/include/asm/gpio.h
@@ -1,53 +1,4 @@
1/* 1#ifndef __LINUX_GPIO_H
2 * Generic GPIO API implementation for PowerPC. 2#warning Include linux/gpio.h instead of asm/gpio.h
3 * 3#include <linux/gpio.h>
4 * Copyright (c) 2007-2008 MontaVista Software, Inc. 4#endif
5 *
6 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 */
13
14#ifndef __ASM_POWERPC_GPIO_H
15#define __ASM_POWERPC_GPIO_H
16
17#include <linux/errno.h>
18#include <asm-generic/gpio.h>
19
20#ifdef CONFIG_GPIOLIB
21
22/*
23 * We don't (yet) implement inlined/rapid versions for on-chip gpios.
24 * Just call gpiolib.
25 */
26static inline int gpio_get_value(unsigned int gpio)
27{
28 return __gpio_get_value(gpio);
29}
30
31static inline void gpio_set_value(unsigned int gpio, int value)
32{
33 __gpio_set_value(gpio, value);
34}
35
36static inline int gpio_cansleep(unsigned int gpio)
37{
38 return __gpio_cansleep(gpio);
39}
40
41static inline int gpio_to_irq(unsigned int gpio)
42{
43 return __gpio_to_irq(gpio);
44}
45
46static inline int irq_to_gpio(unsigned int irq)
47{
48 return -EINVAL;
49}
50
51#endif /* CONFIG_GPIOLIB */
52
53#endif /* __ASM_POWERPC_GPIO_H */
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 5e05c0b445bb..99bcd0ee838d 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -13,6 +13,7 @@ config SUPERH
13 select HAVE_DMA_ATTRS 13 select HAVE_DMA_ATTRS
14 select HAVE_IRQ_WORK 14 select HAVE_IRQ_WORK
15 select HAVE_PERF_EVENTS 15 select HAVE_PERF_EVENTS
16 select ARCH_HAVE_CUSTOM_GPIO_H
16 select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A) 17 select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
17 select PERF_USE_VMALLOC 18 select PERF_USE_VMALLOC
18 select HAVE_KERNEL_GZIP 19 select HAVE_KERNEL_GZIP
diff --git a/arch/sparc/include/asm/gpio.h b/arch/sparc/include/asm/gpio.h
index a0e3ac0af599..b3799d88ffcf 100644
--- a/arch/sparc/include/asm/gpio.h
+++ b/arch/sparc/include/asm/gpio.h
@@ -1,36 +1,4 @@
1#ifndef __ASM_SPARC_GPIO_H 1#ifndef __LINUX_GPIO_H
2#define __ASM_SPARC_GPIO_H 2#warning Include linux/gpio.h instead of asm/gpio.h
3 3#include <linux/gpio.h>
4#include <linux/errno.h> 4#endif
5#include <asm-generic/gpio.h>
6
7#ifdef CONFIG_GPIOLIB
8
9static inline int gpio_get_value(unsigned int gpio)
10{
11 return __gpio_get_value(gpio);
12}
13
14static inline void gpio_set_value(unsigned int gpio, int value)
15{
16 __gpio_set_value(gpio, value);
17}
18
19static inline int gpio_cansleep(unsigned int gpio)
20{
21 return __gpio_cansleep(gpio);
22}
23
24static inline int gpio_to_irq(unsigned int gpio)
25{
26 return -ENOSYS;
27}
28
29static inline int irq_to_gpio(unsigned int irq)
30{
31 return -EINVAL;
32}
33
34#endif /* CONFIG_GPIOLIB */
35
36#endif /* __ASM_SPARC_GPIO_H */
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index 47ad5210606f..03c9ff808b5a 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -8,6 +8,7 @@ config UNICORE32
8 select HAVE_KERNEL_BZIP2 8 select HAVE_KERNEL_BZIP2
9 select HAVE_KERNEL_LZO 9 select HAVE_KERNEL_LZO
10 select HAVE_KERNEL_LZMA 10 select HAVE_KERNEL_LZMA
11 select ARCH_HAVE_CUSTOM_GPIO_H
11 select GENERIC_FIND_FIRST_BIT 12 select GENERIC_FIND_FIRST_BIT
12 select GENERIC_IRQ_PROBE 13 select GENERIC_IRQ_PROBE
13 select GENERIC_IRQ_SHOW 14 select GENERIC_IRQ_SHOW
diff --git a/arch/x86/include/asm/gpio.h b/arch/x86/include/asm/gpio.h
index 91d915a65259..b3799d88ffcf 100644
--- a/arch/x86/include/asm/gpio.h
+++ b/arch/x86/include/asm/gpio.h
@@ -1,53 +1,4 @@
1/* 1#ifndef __LINUX_GPIO_H
2 * Generic GPIO API implementation for x86. 2#warning Include linux/gpio.h instead of asm/gpio.h
3 * 3#include <linux/gpio.h>
4 * Derived from the generic GPIO API for powerpc: 4#endif
5 *
6 * Copyright (c) 2007-2008 MontaVista Software, Inc.
7 *
8 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef _ASM_X86_GPIO_H
17#define _ASM_X86_GPIO_H
18
19#include <asm-generic/gpio.h>
20
21#ifdef CONFIG_GPIOLIB
22
23/*
24 * Just call gpiolib.
25 */
26static inline int gpio_get_value(unsigned int gpio)
27{
28 return __gpio_get_value(gpio);
29}
30
31static inline void gpio_set_value(unsigned int gpio, int value)
32{
33 __gpio_set_value(gpio, value);
34}
35
36static inline int gpio_cansleep(unsigned int gpio)
37{
38 return __gpio_cansleep(gpio);
39}
40
41static inline int gpio_to_irq(unsigned int gpio)
42{
43 return __gpio_to_irq(gpio);
44}
45
46static inline int irq_to_gpio(unsigned int irq)
47{
48 return -EINVAL;
49}
50
51#endif /* CONFIG_GPIOLIB */
52
53#endif /* _ASM_X86_GPIO_H */
diff --git a/arch/xtensa/include/asm/gpio.h b/arch/xtensa/include/asm/gpio.h
index a8c9fc46c790..b3799d88ffcf 100644
--- a/arch/xtensa/include/asm/gpio.h
+++ b/arch/xtensa/include/asm/gpio.h
@@ -1,56 +1,4 @@
1/* 1#ifndef __LINUX_GPIO_H
2 * Generic GPIO API implementation for xtensa. 2#warning Include linux/gpio.h instead of asm/gpio.h
3 * 3#include <linux/gpio.h>
4 * Stolen from x86, which is derived from the generic GPIO API for powerpc: 4#endif
5 *
6 * Copyright (c) 2007-2008 MontaVista Software, Inc.
7 *
8 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef _ASM_XTENSA_GPIO_H
17#define _ASM_XTENSA_GPIO_H
18
19#include <asm-generic/gpio.h>
20
21#ifdef CONFIG_GPIOLIB
22
23/*
24 * Just call gpiolib.
25 */
26static inline int gpio_get_value(unsigned int gpio)
27{
28 return __gpio_get_value(gpio);
29}
30
31static inline void gpio_set_value(unsigned int gpio, int value)
32{
33 __gpio_set_value(gpio, value);
34}
35
36static inline int gpio_cansleep(unsigned int gpio)
37{
38 return __gpio_cansleep(gpio);
39}
40
41static inline int gpio_to_irq(unsigned int gpio)
42{
43 return __gpio_to_irq(gpio);
44}
45
46/*
47 * Not implemented, yet.
48 */
49static inline int irq_to_gpio(unsigned int irq)
50{
51 return -EINVAL;
52}
53
54#endif /* CONFIG_GPIOLIB */
55
56#endif /* _ASM_XTENSA_GPIO_H */