···836836 select CLKDEV_LOOKUP837837 select HAVE_MACH_CLKDEV838838 select GENERIC_GPIO839839+ select ARCH_REQUIRE_GPIOLIB839840 help840841 Support for ST-Ericsson U300 series mobile platforms.841842
···44/* not all ARM platforms necessarily support this API ... */55#include <mach/gpio.h>6677+#ifndef __ARM_GPIOLIB_COMPLEX88+/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */99+#include <asm-generic/gpio.h>1010+1111+/* The trivial gpiolib dispatchers */1212+#define gpio_get_value __gpio_get_value1313+#define gpio_set_value __gpio_set_value1414+#define gpio_cansleep __gpio_cansleep1515+#endif1616+1717+/*1818+ * Provide a default gpio_to_irq() which should satisfy every case.1919+ * However, some platforms want to do this differently, so allow them2020+ * to override it.2121+ */2222+#ifndef gpio_to_irq2323+#define gpio_to_irq __gpio_to_irq2424+#endif2525+726#endif /* _ARCH_ARM_GPIO_H */
+2
arch/arm/include/asm/hardware/iop3xx-gpio.h
···2828#include <mach/hardware.h>2929#include <asm-generic/gpio.h>30303131+#define __ARM_GPIOLIB_COMPLEX3232+3133#define IOP3XX_N_GPIOS 832343335static inline int gpio_get_value(unsigned gpio)
···99 * 2 of the License, or (at your option) any later version.1010*/11111212+#include <linux/gpio.h>1213#include <linux/kernel.h>1314#include <linux/module.h>1415#include <linux/init.h>1516#include <linux/platform_device.h>16171718#include <mach/board.h>1818-#include <mach/gpio.h>191920202121/* ------------------------------------------------------------------------- */
+1-1
arch/arm/mach-at91/pm.c
···1010 * (at your option) any later version.1111 */12121313+#include <linux/gpio.h>1314#include <linux/suspend.h>1415#include <linux/sched.h>1516#include <linux/proc_fs.h>···2625#include <asm/mach/irq.h>27262827#include <mach/at91_pmc.h>2929-#include <mach/gpio.h>3028#include <mach/cpu.h>31293230#include "generic.h"
···88 * is licensed "as is" without any warranty of any kind, whether express99 * or implied.1010 */1111+#include <linux/gpio.h>1112#include <linux/init.h>1213#include <linux/clk.h>1314···2019#include <mach/common.h>2120#include <mach/time.h>2221#include <mach/da8xx.h>2323-#include <mach/gpio.h>2222+#include <mach/gpio-davinci.h>24232524#include "clock.h"2625#include "mux.h"
+2-1
arch/arm/mach-davinci/da850.c
···1111 * is licensed "as is" without any warranty of any kind, whether express1212 * or implied.1313 */1414+#include <linux/gpio.h>1415#include <linux/init.h>1516#include <linux/clk.h>1617#include <linux/platform_device.h>···2827#include <mach/da8xx.h>2928#include <mach/cpufreq.h>3029#include <mach/pm.h>3131-#include <mach/gpio.h>3030+#include <mach/gpio-davinci.h>32313332#include "clock.h"3433#include "mux.h"
···99 * the Free Software Foundation; either version 2 of the License, or1010 * (at your option) any later version.1111 */1212-1212+#include <linux/gpio.h>1313#include <linux/errno.h>1414#include <linux/kernel.h>1515#include <linux/clk.h>1616#include <linux/err.h>1717#include <linux/io.h>1818-1919-#include <mach/gpio.h>20182119#include <asm/mach/irq.h>2220···230232231233static int gpio_irq_type(struct irq_data *d, unsigned trigger)232234{233233- struct davinci_gpio_regs __iomem *g = irq2regs(d->irq);234234- u32 mask = (u32) irq_data_get_irq_handler_data(d);235235-236235 if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))237236 return -EINVAL;238237
+91
arch/arm/mach-davinci/include/mach/gpio-davinci.h
···11+/*22+ * TI DaVinci GPIO Support33+ *44+ * Copyright (c) 2006 David Brownell55+ * Copyright (c) 2007, MontaVista Software, Inc. <source@mvista.com>66+ *77+ * This program is free software; you can redistribute it and/or modify88+ * it under the terms of the GNU General Public License as published by99+ * the Free Software Foundation; either version 2 of the License, or1010+ * (at your option) any later version.1111+ */1212+1313+#ifndef __DAVINCI_DAVINCI_GPIO_H1414+#define __DAVINCI_DAVINCI_GPIO_H1515+1616+#include <linux/io.h>1717+#include <linux/spinlock.h>1818+1919+#include <asm-generic/gpio.h>2020+2121+#include <mach/irqs.h>2222+#include <mach/common.h>2323+2424+#define DAVINCI_GPIO_BASE 0x01C670002525+2626+enum davinci_gpio_type {2727+ GPIO_TYPE_DAVINCI = 0,2828+ GPIO_TYPE_TNETV107X,2929+};3030+3131+/*3232+ * basic gpio routines3333+ *3434+ * board-specific init should be done by arch/.../.../board-XXX.c (maybe3535+ * initializing banks together) rather than boot loaders; kexec() won't3636+ * go through boot loaders.3737+ *3838+ * the gpio clock will be turned on when gpios are used, and you may also3939+ * need to pay attention to PINMUX registers to be sure those pins are4040+ * used as gpios, not with other peripherals.4141+ *4242+ * On-chip GPIOs are numbered 0..(DAVINCI_N_GPIO-1). For documentation,4343+ * and maybe for later updates, code may write GPIO(N). These may be4444+ * all 1.8V signals, all 3.3V ones, or a mix of the two. A given chip4545+ * may not support all the GPIOs in that range.4646+ *4747+ * GPIOs can also be on external chips, numbered after the ones built-in4848+ * to the DaVinci chip. For now, they won't be usable as IRQ sources.4949+ */5050+#define GPIO(X) (X) /* 0 <= X <= (DAVINCI_N_GPIO - 1) */5151+5252+/* Convert GPIO signal to GPIO pin number */5353+#define GPIO_TO_PIN(bank, gpio) (16 * (bank) + (gpio))5454+5555+struct davinci_gpio_controller {5656+ struct gpio_chip chip;5757+ int irq_base;5858+ spinlock_t lock;5959+ void __iomem *regs;6060+ void __iomem *set_data;6161+ void __iomem *clr_data;6262+ void __iomem *in_data;6363+};6464+6565+/* The __gpio_to_controller() and __gpio_mask() functions inline to constants6666+ * with constant parameters; or in outlined code they execute at runtime.6767+ *6868+ * You'd access the controller directly when reading or writing more than6969+ * one gpio value at a time, and to support wired logic where the value7070+ * being driven by the cpu need not match the value read back.7171+ *7272+ * These are NOT part of the cross-platform GPIO interface7373+ */7474+static inline struct davinci_gpio_controller *7575+__gpio_to_controller(unsigned gpio)7676+{7777+ struct davinci_gpio_controller *ctlrs = davinci_soc_info.gpio_ctlrs;7878+ int index = gpio / 32;7979+8080+ if (!ctlrs || index >= davinci_soc_info.gpio_ctlrs_num)8181+ return NULL;8282+8383+ return ctlrs + index;8484+}8585+8686+static inline u32 __gpio_mask(unsigned gpio)8787+{8888+ return 1 << (gpio % 32);8989+}9090+9191+#endif /* __DAVINCI_DAVINCI_GPIO_H */
+2-77
arch/arm/mach-davinci/include/mach/gpio.h
···1313#ifndef __DAVINCI_GPIO_H1414#define __DAVINCI_GPIO_H15151616-#include <linux/io.h>1717-#include <linux/spinlock.h>1818-1916#include <asm-generic/gpio.h>20172121-#include <mach/irqs.h>2222-#include <mach/common.h>2323-2424-#define DAVINCI_GPIO_BASE 0x01C670002525-2626-enum davinci_gpio_type {2727- GPIO_TYPE_DAVINCI = 0,2828- GPIO_TYPE_TNETV107X,2929-};3030-3131-/*3232- * basic gpio routines3333- *3434- * board-specific init should be done by arch/.../.../board-XXX.c (maybe3535- * initializing banks together) rather than boot loaders; kexec() won't3636- * go through boot loaders.3737- *3838- * the gpio clock will be turned on when gpios are used, and you may also3939- * need to pay attention to PINMUX registers to be sure those pins are4040- * used as gpios, not with other peripherals.4141- *4242- * On-chip GPIOs are numbered 0..(DAVINCI_N_GPIO-1). For documentation,4343- * and maybe for later updates, code may write GPIO(N). These may be4444- * all 1.8V signals, all 3.3V ones, or a mix of the two. A given chip4545- * may not support all the GPIOs in that range.4646- *4747- * GPIOs can also be on external chips, numbered after the ones built-in4848- * to the DaVinci chip. For now, they won't be usable as IRQ sources.4949- */5050-#define GPIO(X) (X) /* 0 <= X <= (DAVINCI_N_GPIO - 1) */5151-5252-/* Convert GPIO signal to GPIO pin number */5353-#define GPIO_TO_PIN(bank, gpio) (16 * (bank) + (gpio))5454-5555-struct davinci_gpio_controller {5656- struct gpio_chip chip;5757- int irq_base;5858- spinlock_t lock;5959- void __iomem *regs;6060- void __iomem *set_data;6161- void __iomem *clr_data;6262- void __iomem *in_data;6363-};6464-6565-/* The __gpio_to_controller() and __gpio_mask() functions inline to constants6666- * with constant parameters; or in outlined code they execute at runtime.6767- *6868- * You'd access the controller directly when reading or writing more than6969- * one gpio value at a time, and to support wired logic where the value7070- * being driven by the cpu need not match the value read back.7171- *7272- * These are NOT part of the cross-platform GPIO interface7373- */7474-static inline struct davinci_gpio_controller *7575-__gpio_to_controller(unsigned gpio)7676-{7777- struct davinci_gpio_controller *ctlrs = davinci_soc_info.gpio_ctlrs;7878- int index = gpio / 32;7979-8080- if (!ctlrs || index >= davinci_soc_info.gpio_ctlrs_num)8181- return NULL;8282-8383- return ctlrs + index;8484-}8585-8686-static inline u32 __gpio_mask(unsigned gpio)8787-{8888- return 1 << (gpio % 32);8989-}1818+/* The inline versions use the static inlines in the driver header */1919+#include "gpio-davinci.h"90209121/*9222 * The get/set/clear functions will inline when called with constant···75145 return 0;76146 else77147 return __gpio_cansleep(gpio);7878-}7979-8080-static inline int gpio_to_irq(unsigned gpio)8181-{8282- return __gpio_to_irq(gpio);83148}8414985150static inline int irq_to_gpio(unsigned irq)
+2-1
arch/arm/mach-davinci/tnetv107x.c
···1212 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1313 * GNU General Public License for more details.1414 */1515+#include <linux/gpio.h>1516#include <linux/kernel.h>1617#include <linux/init.h>1718#include <linux/clk.h>···2827#include <mach/psc.h>2928#include <mach/cp_intc.h>3029#include <mach/irqs.h>3131-#include <mach/gpio.h>3230#include <mach/hardware.h>3331#include <mach/tnetv107x.h>3232+#include <mach/gpio-davinci.h>34333534#include "clock.h"3635#include "mux.h"
···1313#ifndef __ASM_ARCH_GPIO_H1414#define __ASM_ARCH_GPIO_H __FILE__15151616-#define gpio_get_value __gpio_get_value1717-#define gpio_set_value __gpio_set_value1818-#define gpio_cansleep __gpio_cansleep1919-#define gpio_to_irq __gpio_to_irq2020-2116/* Practically, GPIO banks up to GPZ are the configurable gpio banks */22172318/* GPIO bank sizes */···145150/* define the number of gpios we need to the one after the GPZ() range */146151#define ARCH_NR_GPIOS (EXYNOS4_GPZ(EXYNOS4_GPIO_Z_NR) + \147152 CONFIG_SAMSUNG_GPIO_EXTRA + 1)148148-149149-#include <asm-generic/gpio.h>150153151154#endif /* __ASM_ARCH_GPIO_H */
···1313 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1414 * GNU General Public License for more details.1515 */1616-1616+#include <linux/gpio.h>1717#include <linux/platform_device.h>1818#include <linux/mtd/mtd.h>1919#include <linux/mtd/map.h>···2727#include <asm/mach/arch.h>2828#include <asm/mach/time.h>2929#include <asm/mach/map.h>3030-#include <mach/gpio.h>3130#include <mach/iomux-mx27.h>32313332#include "devices-imx27.h"
+2-2
arch/arm/mach-ixp2000/core.c
···1313 * License version 2. This program is licensed "as is" without any 1414 * warranty of any kind, whether express or implied.1515 */1616-1616+#include <linux/gpio.h>1717#include <linux/kernel.h>1818#include <linux/init.h>1919#include <linux/spinlock.h>···3939#include <asm/mach/time.h>4040#include <asm/mach/irq.h>41414242-#include <mach/gpio.h>4242+#include <mach/gpio-ixp2000.h>43434444static DEFINE_SPINLOCK(ixp2000_slowport_lock);4545static unsigned long ixp2000_slowport_irq_flags;
···33 *44 * Copyright (C) 2002 Intel Corporation.55 *66- * This program is free software, you can redistribute it and/or modify 66+ * This program is free software, you can redistribute it and/or modify77 * it under the terms of the GNU General Public License version 2 as88 * published by the Free Software Foundation.99 */···1111/*1212 * IXP2000 GPIO in/out, edge/level detection for IRQs:1313 * IRQs are generated on Falling-edge, Rising-Edge, Level-low, Level-High1414- * or both Falling-edge and Rising-edge. 1414+ * or both Falling-edge and Rising-edge.1515 * This must be called *before* the corresponding IRQ is registerd.1616 * Use this instead of directly setting the GPIO registers.1717 * GPIOs may also be used as GPIOs (e.g. for emulating i2c/smb)
+2-2
arch/arm/mach-ixp2000/ixdp2x00.c
···1414 * Free Software Foundation; either version 2 of the License, or (at your1515 * option) any later version.1616 */1717+#include <linux/gpio.h>1718#include <linux/kernel.h>1819#include <linux/init.h>1920#include <linux/mm.h>···4140#include <asm/mach/flash.h>4241#include <asm/mach/arch.h>43424444-#include <mach/gpio.h>4545-4343+#include <mach/gpio-ixp2000.h>46444745/*************************************************************************4846 * IXDP2x00 IRQ Initialization
···77 * License version 2. This program is licensed "as is" without any88 * warranty of any kind, whether express or implied.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/kernel.h>1212#include <linux/init.h>1313#include <linux/irq.h>1414#include <linux/io.h>1515#include <mach/bridge-regs.h>1616#include <plat/irq.h>1717-#include <asm/gpio.h>1817#include "common.h"19182019static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
+1-2
arch/arm/mach-kirkwood/mpp.c
···77 * License version 2. This program is licensed "as is" without any88 * warranty of any kind, whether express or implied.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/kernel.h>1212#include <linux/init.h>1313#include <linux/mbus.h>1414#include <linux/io.h>1515-#include <asm/gpio.h>1615#include <mach/hardware.h>1716#include <plat/mpp.h>1817#include "common.h"
···1010 * it under the terms of the GNU General Public License version 2 as1111 * published by the Free Software Foundation.1212 */1313-1313+#include <linux/gpio.h>1414#include <linux/kernel.h>1515#include <linux/types.h>1616#include <linux/interrupt.h>···3434#include <asm/mach/irq.h>35353636#include <mach/devices.h>3737-#include <mach/gpio.h>3737+#include <mach/gpio-ks8695.h>38383939#include "generic.h"4040
+2-2
arch/arm/mach-ks8695/board-dsm320.c
···1010 * it under the terms of the GNU General Public License version 2 as1111 * published by the Free Software Foundation.1212 */1313-1313+#include <linux/gpio.h>1414#include <linux/kernel.h>1515#include <linux/types.h>1616#include <linux/interrupt.h>···2929#include <asm/mach/irq.h>30303131#include <mach/devices.h>3232-#include <mach/gpio.h>3232+#include <mach/gpio-ks8695.h>33333434#include "generic.h"3535
+2-2
arch/arm/mach-ks8695/board-micrel.c
···55 * it under the terms of the GNU General Public License version 2 as66 * published by the Free Software Foundation.77 */88-88+#include <linux/gpio.h>99#include <linux/kernel.h>1010#include <linux/types.h>1111#include <linux/interrupt.h>···1818#include <asm/mach/map.h>1919#include <asm/mach/irq.h>20202121-#include <mach/gpio.h>2121+#include <mach/gpio-ks8695.h>2222#include <mach/devices.h>23232424#include "generic.h"
···1818 * along with this program; if not, write to the Free Software1919 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA2020 */2121-2121+#include <linux/gpio.h>2222#include <linux/kernel.h>2323#include <linux/mm.h>2424#include <linux/init.h>···3131#include <asm/mach/irq.h>32323333#include <mach/regs-gpio.h>3434-#include <mach/gpio.h>3434+#include <mach/gpio-ks8695.h>35353636/*3737 * Configure a GPIO line for either GPIO function, or its internal
+39
arch/arm/mach-ks8695/include/mach/gpio-ks8695.h
···11+/*22+ * Copyright (C) 2006 Andrew Victor33+ *44+ * This program is free software; you can redistribute it and/or modify55+ * it under the terms of the GNU General Public License version 2 as66+ * published by the Free Software Foundation.77+ */88+99+#ifndef __MACH_KS8659_GPIO_H1010+#define __MACH_KS8659_GPIO_H1111+1212+#include <linux/kernel.h>1313+1414+#define KS8695_GPIO_0 01515+#define KS8695_GPIO_1 11616+#define KS8695_GPIO_2 21717+#define KS8695_GPIO_3 31818+#define KS8695_GPIO_4 41919+#define KS8695_GPIO_5 52020+#define KS8695_GPIO_6 62121+#define KS8695_GPIO_7 72222+#define KS8695_GPIO_8 82323+#define KS8695_GPIO_9 92424+#define KS8695_GPIO_10 102525+#define KS8695_GPIO_11 112626+#define KS8695_GPIO_12 122727+#define KS8695_GPIO_13 132828+#define KS8695_GPIO_14 142929+#define KS8695_GPIO_15 153030+3131+/*3232+ * Configure GPIO pin as external interrupt source.3333+ */3434+extern int ks8695_gpio_interrupt(unsigned int pin, unsigned int type);3535+3636+/* Register the GPIOs */3737+extern void ks8695_register_gpios(void);3838+3939+#endif /* __MACH_KS8659_GPIO_H */
-38
arch/arm/mach-ks8695/include/mach/gpio.h
···1111#ifndef __ASM_ARCH_GPIO_H_1212#define __ASM_ARCH_GPIO_H_13131414-#include <linux/kernel.h>1515-1616-#define KS8695_GPIO_0 01717-#define KS8695_GPIO_1 11818-#define KS8695_GPIO_2 21919-#define KS8695_GPIO_3 32020-#define KS8695_GPIO_4 42121-#define KS8695_GPIO_5 52222-#define KS8695_GPIO_6 62323-#define KS8695_GPIO_7 72424-#define KS8695_GPIO_8 82525-#define KS8695_GPIO_9 92626-#define KS8695_GPIO_10 102727-#define KS8695_GPIO_11 112828-#define KS8695_GPIO_12 122929-#define KS8695_GPIO_13 133030-#define KS8695_GPIO_14 143131-#define KS8695_GPIO_15 153232-3333-/*3434- * Configure GPIO pin as external interrupt source.3535- */3636-extern int ks8695_gpio_interrupt(unsigned int pin, unsigned int type);3737-3814/*3915 * Map IRQ number to GPIO line.4016 */4117extern int irq_to_gpio(unsigned int irq);4242-4343-#include <asm-generic/gpio.h>4444-4545-/* If it turns out that we need to optimise GPIO access for the4646- * Micrel's GPIOs, then these can be changed to check their argument4747- * directly as static inlines. However for now it's probably not4848- * worthwhile.4949- */5050-#define gpio_get_value __gpio_get_value5151-#define gpio_set_value __gpio_set_value5252-#define gpio_to_irq __gpio_to_irq5353-5454-/* Register the GPIOs */5555-extern void ks8695_register_gpios(void);56185719#endif
+2-2
arch/arm/mach-ks8695/leds.c
···77 * it under the terms of the GNU General Public License version 2 as88 * published by the Free Software Foundation.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/kernel.h>1212#include <linux/module.h>1313#include <linux/init.h>1414+#include <linux/gpio.h>14151516#include <asm/leds.h>1617#include <mach/devices.h>1717-#include <mach/gpio.h>181819192020static inline void ks8695_led_on(unsigned int led)
···11+/*22+ * Author: Kevin Wells <kevin.wells@nxp.com>33+ *44+ * Copyright (C) 2010 NXP Semiconductors55+ *66+ * This program is free software; you can redistribute it and/or modify77+ * it under the terms of the GNU General Public License as published by88+ * the Free Software Foundation; either version 2 of the License, or99+ * (at your option) any later version.1010+ *1111+ * This program is distributed in the hope that it will be useful,1212+ * but WITHOUT ANY WARRANTY; without even the implied warranty of1313+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1414+ * GNU General Public License for more details.1515+ */1616+1717+#ifndef __MACH_GPIO_LPC32XX_H1818+#define __MACH_GPIO_LPC32XX_H1919+2020+/*2121+ * Note!2222+ * Muxed GP pins need to be setup to the GP state in the board level2323+ * code prior to using this driver.2424+ * GPI pins : 28xP3 group2525+ * GPO pins : 24xP3 group2626+ * GPIO pins: 8xP0 group, 24xP1 group, 13xP2 group, 6xP3 group2727+ */2828+2929+#define LPC32XX_GPIO_P0_MAX 83030+#define LPC32XX_GPIO_P1_MAX 243131+#define LPC32XX_GPIO_P2_MAX 133232+#define LPC32XX_GPIO_P3_MAX 63333+#define LPC32XX_GPI_P3_MAX 283434+#define LPC32XX_GPO_P3_MAX 243535+3636+#define LPC32XX_GPIO_P0_GRP 03737+#define LPC32XX_GPIO_P1_GRP (LPC32XX_GPIO_P0_GRP + LPC32XX_GPIO_P0_MAX)3838+#define LPC32XX_GPIO_P2_GRP (LPC32XX_GPIO_P1_GRP + LPC32XX_GPIO_P1_MAX)3939+#define LPC32XX_GPIO_P3_GRP (LPC32XX_GPIO_P2_GRP + LPC32XX_GPIO_P2_MAX)4040+#define LPC32XX_GPI_P3_GRP (LPC32XX_GPIO_P3_GRP + LPC32XX_GPIO_P3_MAX)4141+#define LPC32XX_GPO_P3_GRP (LPC32XX_GPI_P3_GRP + LPC32XX_GPI_P3_MAX)4242+4343+/*4444+ * A specific GPIO can be selected with this macro4545+ * ie, GPIO_05 can be selected with LPC32XX_GPIO(LPC32XX_GPIO_P3_GRP, 5)4646+ * See the LPC32x0 User's guide for GPIO group numbers4747+ */4848+#define LPC32XX_GPIO(x, y) ((x) + (y))4949+5050+#endif /* __MACH_GPIO_LPC32XX_H */
-74
arch/arm/mach-lpc32xx/include/mach/gpio.h
···11-/*22- * arch/arm/mach-lpc32xx/include/mach/gpio.h33- *44- * Author: Kevin Wells <kevin.wells@nxp.com>55- *66- * Copyright (C) 2010 NXP Semiconductors77- *88- * This program is free software; you can redistribute it and/or modify99- * it under the terms of the GNU General Public License as published by1010- * the Free Software Foundation; either version 2 of the License, or1111- * (at your option) any later version.1212- *1313- * This program is distributed in the hope that it will be useful,1414- * but WITHOUT ANY WARRANTY; without even the implied warranty of1515- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1616- * GNU General Public License for more details.1717- */1818-1919-#ifndef __ASM_ARCH_GPIO_H2020-#define __ASM_ARCH_GPIO_H2121-2222-#include <asm-generic/gpio.h>2323-2424-/*2525- * Note!2626- * Muxed GP pins need to be setup to the GP state in the board level2727- * code prior to using this driver.2828- * GPI pins : 28xP3 group2929- * GPO pins : 24xP3 group3030- * GPIO pins: 8xP0 group, 24xP1 group, 13xP2 group, 6xP3 group3131- */3232-3333-#define LPC32XX_GPIO_P0_MAX 83434-#define LPC32XX_GPIO_P1_MAX 243535-#define LPC32XX_GPIO_P2_MAX 133636-#define LPC32XX_GPIO_P3_MAX 63737-#define LPC32XX_GPI_P3_MAX 283838-#define LPC32XX_GPO_P3_MAX 243939-4040-#define LPC32XX_GPIO_P0_GRP 04141-#define LPC32XX_GPIO_P1_GRP (LPC32XX_GPIO_P0_GRP + LPC32XX_GPIO_P0_MAX)4242-#define LPC32XX_GPIO_P2_GRP (LPC32XX_GPIO_P1_GRP + LPC32XX_GPIO_P1_MAX)4343-#define LPC32XX_GPIO_P3_GRP (LPC32XX_GPIO_P2_GRP + LPC32XX_GPIO_P2_MAX)4444-#define LPC32XX_GPI_P3_GRP (LPC32XX_GPIO_P3_GRP + LPC32XX_GPIO_P3_MAX)4545-#define LPC32XX_GPO_P3_GRP (LPC32XX_GPI_P3_GRP + LPC32XX_GPI_P3_MAX)4646-4747-/*4848- * A specific GPIO can be selected with this macro4949- * ie, GPIO_05 can be selected with LPC32XX_GPIO(LPC32XX_GPIO_P3_GRP, 5)5050- * See the LPC32x0 User's guide for GPIO group numbers5151- */5252-#define LPC32XX_GPIO(x, y) ((x) + (y))5353-5454-static inline int gpio_get_value(unsigned gpio)5555-{5656- return __gpio_get_value(gpio);5757-}5858-5959-static inline void gpio_set_value(unsigned gpio, int value)6060-{6161- __gpio_set_value(gpio, value);6262-}6363-6464-static inline int gpio_cansleep(unsigned gpio)6565-{6666- return __gpio_cansleep(gpio);6767-}6868-6969-static inline int gpio_to_irq(unsigned gpio)7070-{7171- return __gpio_to_irq(gpio);7272-}7373-7474-#endif
···88 * it under the terms of the GNU General Public License version 2 as99 * publishhed by the Free Software Foundation.1010 */1111-1111+#include <linux/gpio.h>1212#include <linux/init.h>1313#include <linux/kernel.h>1414#include <linux/platform_device.h>···1717#include <linux/mtd/partitions.h>1818#include <linux/mtd/nand.h>1919#include <linux/interrupt.h>2020+#include <linux/gpio.h>20212122#include <asm/mach-types.h>2223#include <asm/mach/arch.h>2324#include <mach/addr-map.h>2425#include <mach/mfp-pxa168.h>2526#include <mach/pxa168.h>2626-#include <mach/gpio.h>2727#include <video/pxa168fb.h>2828#include <linux/input.h>2929#include <plat/pxa27x_keypad.h>
···99 * it under the terms of the GNU General Public License version 2 as1010 * published by the Free Software Foundation.1111 */1212-1312#include <linux/module.h>1413#include <linux/kernel.h>1514#include <linux/init.h>···2425#include <mach/irqs.h>2526#include <mach/dma.h>2627#include <mach/mfp.h>2727-#include <mach/gpio.h>2828+#include <mach/gpio-pxa.h>2829#include <mach/devices.h>2930#include <mach/mmp2.h>3031
+1-2
arch/arm/mach-mmp/pxa168.c
···77 * it under the terms of the GNU General Public License version 2 as88 * published by the Free Software Foundation.99 */1010-1110#include <linux/module.h>1211#include <linux/kernel.h>1312#include <linux/init.h>···2021#include <mach/regs-apbc.h>2122#include <mach/regs-apmu.h>2223#include <mach/irqs.h>2323-#include <mach/gpio.h>2424+#include <mach/gpio-pxa.h>2425#include <mach/dma.h>2526#include <mach/devices.h>2627#include <mach/mfp.h>
+1-2
arch/arm/mach-mmp/pxa910.c
···77 * it under the terms of the GNU General Public License version 2 as88 * published by the Free Software Foundation.99 */1010-1110#include <linux/module.h>1211#include <linux/kernel.h>1312#include <linux/init.h>···1920#include <mach/regs-apmu.h>2021#include <mach/cputype.h>2122#include <mach/irqs.h>2222-#include <mach/gpio.h>2323+#include <mach/gpio-pxa.h>2324#include <mach/dma.h>2425#include <mach/mfp.h>2526#include <mach/devices.h>
+2-2
arch/arm/mach-mmp/tavorevb.c
···77 * it under the terms of the GNU General Public License version 2 as88 * publishhed by the Free Software Foundation.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/init.h>1212#include <linux/kernel.h>1313#include <linux/platform_device.h>1414#include <linux/smc91x.h>1515+#include <linux/gpio.h>15161617#include <asm/mach-types.h>1718#include <asm/mach/arch.h>1819#include <mach/addr-map.h>1920#include <mach/mfp-pxa910.h>2021#include <mach/pxa910.h>2121-#include <mach/gpio.h>22222323#include "common.h"2424
+1-2
arch/arm/mach-msm/board-msm7x27.c
···1313 * GNU General Public License for more details.1414 *1515 */1616-1616+#include <linux/gpio.h>1717#include <linux/kernel.h>1818#include <linux/init.h>1919#include <linux/platform_device.h>···34343535#include <mach/vreg.h>3636#include <mach/mpp.h>3737-#include <mach/gpio.h>3837#include <mach/board.h>3938#include <mach/msm_iomap.h>4039
···1111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1212 * GNU General Public License for more details.1313*/1414-1414+#include <linux/gpio.h>1515#include <linux/kernel.h>1616#include <linux/init.h>1717#include <linux/platform_device.h>···22222323#include <linux/delay.h>24242525-#include <asm/gpio.h>2625#include <mach/hardware.h>2726#include <asm/mach-types.h>2827#include <asm/mach/arch.h>
···11-/*22- * Copyright (C) 2007 Google, Inc.33- * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.44- * Author: Mike Lockwood <lockwood@android.com>55- *66- * This software is licensed under the terms of the GNU General Public77- * License version 2, as published by the Free Software Foundation, and88- * may be copied, distributed, and modified under those terms.99- *1010- * This program is distributed in the hope that it will be useful,1111- * but WITHOUT ANY WARRANTY; without even the implied warranty of1212- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1313- * GNU General Public License for more details.1414- *1515- */1616-#ifndef __ASM_ARCH_MSM_GPIO_H1717-#define __ASM_ARCH_MSM_GPIO_H1818-1919-#include <asm-generic/gpio.h>2020-2121-#define gpio_get_value __gpio_get_value2222-#define gpio_set_value __gpio_set_value2323-#define gpio_cansleep __gpio_cansleep2424-#define gpio_to_irq __gpio_to_irq2525-2626-#endif /* __ASM_ARCH_MSM_GPIO_H */11+/* empty */
+1-2
arch/arm/mach-mv78xx0/irq.c
···77 * License version 2. This program is licensed "as is" without any88 * warranty of any kind, whether express or implied.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/kernel.h>1212#include <linux/init.h>1313#include <linux/pci.h>1414#include <linux/irq.h>1515-#include <asm/gpio.h>1615#include <mach/bridge-regs.h>1716#include <plat/irq.h>1817#include "common.h"
+1-2
arch/arm/mach-mv78xx0/mpp.c
···77 * License version 2. This program is licensed "as is" without any88 * warranty of any kind, whether express or implied.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/kernel.h>1212#include <linux/init.h>1313#include <linux/mbus.h>1414#include <linux/io.h>1515#include <plat/mpp.h>1616-#include <asm/gpio.h>1716#include <mach/hardware.h>1817#include "common.h"1918#include "mpp.h"
+1-31
arch/arm/mach-mxs/include/mach/gpio.h
···11-/*22- * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved.33- * Copyright 2008 Juergen Beisert, kernel@pengutronix.de44- *55- * This program is free software; you can redistribute it and/or66- * modify it under the terms of the GNU General Public License77- * as published by the Free Software Foundation; either version 288- * of the License, or (at your option) any later version.99- * This program is distributed in the hope that it will be useful,1010- * but WITHOUT ANY WARRANTY; without even the implied warranty of1111- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1212- * GNU General Public License for more details.1313- *1414- * You should have received a copy of the GNU General Public License1515- * along with this program; if not, write to the Free Software1616- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,1717- * MA 02110-1301, USA.1818- */1919-2020-#ifndef __MACH_MXS_GPIO_H__2121-#define __MACH_MXS_GPIO_H__2222-2323-#include <asm-generic/gpio.h>2424-2525-/* use gpiolib dispatchers */2626-#define gpio_get_value __gpio_get_value2727-#define gpio_set_value __gpio_set_value2828-#define gpio_cansleep __gpio_cansleep2929-#define gpio_to_irq __gpio_to_irq3030-3131-#endif /* __MACH_MXS_GPIO_H__ */11+/* empty */
···33#include <linux/i2c.h>44#include <linux/i2c-algo-bit.h>55#include <linux/i2c-gpio.h>66-#include <linux/gpio.h>76#include <linux/platform_device.h>77+#include <plat/gpio-nomadik.h>8899/*1010 * There are two busses in the 8815NHK.
···1111 * it under the terms of the GNU General Public License version 2 as1212 * published by the Free Software Foundation.1313 */1414-1414+#include <linux/gpio.h>1515#include <linux/kernel.h>1616#include <linux/init.h>1717#include <linux/input.h>···30303131#include <plat/io.h>3232#include <plat/board-ams-delta.h>3333-#include <mach/gpio.h>3433#include <plat/keypad.h>3534#include <plat/mux.h>3635#include <plat/usb.h>
+1-2
arch/arm/mach-omap1/board-fsample.c
···1010 * it under the terms of the GNU General Public License version 2 as1111 * published by the Free Software Foundation.1212 */1313-1313+#include <linux/gpio.h>1414#include <linux/kernel.h>1515#include <linux/init.h>1616#include <linux/platform_device.h>···2828#include <asm/mach/map.h>29293030#include <plat/tc.h>3131-#include <mach/gpio.h>3231#include <plat/mux.h>3332#include <plat/flash.h>3433#include <plat/fpga.h>
+1-2
arch/arm/mach-omap1/board-generic.c
···1212 * it under the terms of the GNU General Public License version 2 as1313 * published by the Free Software Foundation.1414 */1515-1515+#include <linux/gpio.h>1616#include <linux/kernel.h>1717#include <linux/init.h>1818#include <linux/platform_device.h>···2222#include <asm/mach/arch.h>2323#include <asm/mach/map.h>24242525-#include <mach/gpio.h>2625#include <plat/mux.h>2726#include <plat/usb.h>2827#include <plat/board.h>
+1-2
arch/arm/mach-omap1/board-h2-mmc.c
···1111 * it under the terms of the GNU General Public License version 2 as1212 * published by the Free Software Foundation.1313 */1414-1414+#include <linux/gpio.h>1515#include <linux/platform_device.h>16161717#include <linux/i2c/tps65010.h>18181919#include <plat/mmc.h>2020-#include <mach/gpio.h>21202221#include "board-h2.h"2322
+1-2
arch/arm/mach-omap1/board-h2.c
···1818 * it under the terms of the GNU General Public License version 2 as1919 * published by the Free Software Foundation.2020 */2121-2121+#include <linux/gpio.h>2222#include <linux/kernel.h>2323#include <linux/platform_device.h>2424#include <linux/delay.h>···3232#include <linux/smc91x.h>33333434#include <mach/hardware.h>3535-#include <asm/gpio.h>36353736#include <asm/mach-types.h>3837#include <asm/mach/arch.h>
+1-2
arch/arm/mach-omap1/board-h3-mmc.c
···1111 * it under the terms of the GNU General Public License version 2 as1212 * published by the Free Software Foundation.1313 */1414-1414+#include <linux/gpio.h>1515#include <linux/platform_device.h>16161717#include <linux/i2c/tps65010.h>18181919#include <plat/mmc.h>2020-#include <mach/gpio.h>21202221#include "board-h3.h"2322
+1-2
arch/arm/mach-omap1/board-h3.c
···1313 * it under the terms of the GNU General Public License version 2 as1414 * published by the Free Software Foundation.1515 */1616-1616+#include <linux/gpio.h>1717#include <linux/types.h>1818#include <linux/init.h>1919#include <linux/major.h>···3434#include <asm/setup.h>3535#include <asm/page.h>3636#include <mach/hardware.h>3737-#include <asm/gpio.h>38373938#include <asm/mach-types.h>4039#include <asm/mach/arch.h>
···1515 * it under the terms of the GNU General Public License version 2 as1616 * published by the Free Software Foundation.1717 */1818-1818+#include <linux/gpio.h>1919#include <linux/kernel.h>2020#include <linux/init.h>2121#include <linux/platform_device.h>···3434#include <plat/mux.h>3535#include <plat/flash.h>3636#include <plat/fpga.h>3737-#include <mach/gpio.h>3837#include <plat/tc.h>3938#include <plat/usb.h>4039#include <plat/keypad.h>
+1-2
arch/arm/mach-omap1/board-nokia770.c
···77 * it under the terms of the GNU General Public License version 2 as88 * published by the Free Software Foundation.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/kernel.h>1212#include <linux/init.h>1313#include <linux/mutex.h>···2626#include <asm/mach/arch.h>2727#include <asm/mach/map.h>28282929-#include <mach/gpio.h>3029#include <plat/mux.h>3130#include <plat/usb.h>3231#include <plat/board.h>
+1-2
arch/arm/mach-omap1/board-osk.c
···2525 * with this program; if not, write to the Free Software Foundation, Inc.,2626 * 675 Mass Ave, Cambridge, MA 02139, USA.2727 */2828-2828+#include <linux/gpio.h>2929#include <linux/kernel.h>3030#include <linux/init.h>3131#include <linux/platform_device.h>···4242#include <linux/i2c/tps65010.h>43434444#include <mach/hardware.h>4545-#include <asm/gpio.h>46454746#include <asm/mach-types.h>4847#include <asm/mach/arch.h>
+1-2
arch/arm/mach-omap1/board-palmte.c
···1616 * it under the terms of the GNU General Public License version 2 as1717 * published by the Free Software Foundation.1818 */1919-1919+#include <linux/gpio.h>2020#include <linux/kernel.h>2121#include <linux/init.h>2222#include <linux/input.h>···3333#include <asm/mach/arch.h>3434#include <asm/mach/map.h>35353636-#include <mach/gpio.h>3736#include <plat/flash.h>3837#include <plat/mux.h>3938#include <plat/usb.h>
···1010 * it under the terms of the GNU General Public License version 2 as1111 * published by the Free Software Foundation.1212 */1313-1313+#include <linux/gpio.h>1414#include <linux/kernel.h>1515#include <linux/init.h>1616#include <linux/platform_device.h>···2828#include <asm/mach/map.h>29293030#include <plat/tc.h>3131-#include <mach/gpio.h>3231#include <plat/mux.h>3332#include <plat/fpga.h>3433#include <plat/flash.h>
+1-1
arch/arm/mach-omap1/board-sx1-mmc.c
···1212 * published by the Free Software Foundation.1313 */14141515+#include <linux/gpio.h>1516#include <linux/platform_device.h>16171718#include <mach/hardware.h>1819#include <plat/mmc.h>1919-#include <mach/gpio.h>2020#include <plat/board-sx1.h>21212222#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
+1-2
arch/arm/mach-omap1/board-sx1.c
···1414* it under the terms of the GNU General Public License version 2 as1515* published by the Free Software Foundation.1616*/1717-1717+#include <linux/gpio.h>1818#include <linux/kernel.h>1919#include <linux/init.h>2020#include <linux/input.h>···3232#include <asm/mach/arch.h>3333#include <asm/mach/map.h>34343535-#include <mach/gpio.h>3635#include <plat/flash.h>3736#include <plat/mux.h>3837#include <plat/dma.h>
···3535 * with this program; if not, write to the Free Software Foundation, Inc.,3636 * 675 Mass Ave, Cambridge, MA 02139, USA.3737 */3838-3838+#include <linux/gpio.h>3939#include <linux/init.h>4040#include <linux/module.h>4141#include <linux/sched.h>···4545#include <mach/hardware.h>4646#include <asm/irq.h>4747#include <asm/mach/irq.h>4848-#include <mach/gpio.h>4948#include <plat/cpu.h>50495150#define IRQ_BANK(irq) ((irq) >> 5)
+1-1
arch/arm/mach-omap1/leds-h2p2-debug.c
···99 * The "surfer" expansion board and H2 sample board also have two-color1010 * green+red LEDs (in parallel), used here for timer and idle indicators.1111 */1212+#include <linux/gpio.h>1213#include <linux/init.h>1314#include <linux/kernel_stat.h>1415#include <linux/sched.h>···2120#include <asm/mach-types.h>22212322#include <plat/fpga.h>2424-#include <mach/gpio.h>25232624#include "leds.h"2725
+1-2
arch/arm/mach-omap1/leds-osk.c
···33 *44 * LED driver for OSK with optional Mistral QVGA board55 */66+#include <linux/gpio.h>67#include <linux/init.h>7889#include <mach/hardware.h>910#include <asm/leds.h>1011#include <asm/system.h>1111-1212-#include <mach/gpio.h>13121413#include "leds.h"1514
···77 * it under the terms of the GNU General Public License version 2 as88 * published by the Free Software Foundation.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/module.h>1212#include <linux/kernel.h>1313#include <linux/init.h>···24242525#include <plat/board.h>2626#include <plat/mux.h>2727-#include <mach/gpio.h>2827#include <plat/fpga.h>29283029#include "pm.h"
+1-2
arch/arm/mach-omap2/board-generic.c
···1515 * it under the terms of the GNU General Public License version 2 as1616 * published by the Free Software Foundation.1717 */1818-1818+#include <linux/gpio.h>1919#include <linux/kernel.h>2020#include <linux/init.h>2121#include <linux/device.h>···2525#include <asm/mach/arch.h>2626#include <asm/mach/map.h>27272828-#include <mach/gpio.h>2928#include <plat/usb.h>3029#include <plat/board.h>3130#include <plat/common.h>
+1-2
arch/arm/mach-omap2/board-h4.c
···1010 * it under the terms of the GNU General Public License version 2 as1111 * published by the Free Software Foundation.1212 */1313-1313+#include <linux/gpio.h>1414#include <linux/kernel.h>1515#include <linux/init.h>1616#include <linux/platform_device.h>···3131#include <asm/mach/arch.h>3232#include <asm/mach/map.h>33333434-#include <mach/gpio.h>3534#include <plat/usb.h>3635#include <plat/board.h>3736#include <plat/common.h>
+1-2
arch/arm/mach-omap2/board-ldp.c
···1010 * it under the terms of the GNU General Public License version 2 as1111 * published by the Free Software Foundation.1212 */1313-1313+#include <linux/gpio.h>1414#include <linux/kernel.h>1515#include <linux/init.h>1616#include <linux/platform_device.h>···3434#include <asm/mach/map.h>35353636#include <plat/mcspi.h>3737-#include <mach/gpio.h>3837#include <plat/board.h>3938#include <plat/common.h>4039#include <plat/gpmc.h>
+1-2
arch/arm/mach-omap2/devices.c
···88 * the Free Software Foundation; either version 2 of the License, or99 * (at your option) any later version.1010 */1111-1111+#include <linux/gpio.h>1212#include <linux/kernel.h>1313#include <linux/init.h>1414#include <linux/platform_device.h>···2626#include <plat/tc.h>2727#include <plat/board.h>2828#include <plat/mcbsp.h>2929-#include <mach/gpio.h>3029#include <plat/mmc.h>3130#include <plat/dma.h>3231#include <plat/omap_hwmod.h>
+1-2
arch/arm/mach-orion5x/db88f5281-setup.c
···99 * License version 2. This program is licensed "as is" without any1010 * warranty of any kind, whether express or implied.1111 */1212-1212+#include <linux/gpio.h>1313#include <linux/kernel.h>1414#include <linux/init.h>1515#include <linux/platform_device.h>···2121#include <linux/mv643xx_eth.h>2222#include <linux/i2c.h>2323#include <asm/mach-types.h>2424-#include <asm/gpio.h>2524#include <asm/mach/arch.h>2625#include <asm/mach/pci.h>2726#include <mach/orion5x.h>
+1-2
arch/arm/mach-orion5x/dns323-setup.c
···1313 * License, or (at your option) any later version.1414 *1515 */1616-1616+#include <linux/gpio.h>1717#include <linux/kernel.h>1818#include <linux/init.h>1919#include <linux/delay.h>···3030#include <linux/phy.h>3131#include <linux/marvell_phy.h>3232#include <asm/mach-types.h>3333-#include <asm/gpio.h>3433#include <asm/mach/arch.h>3534#include <asm/mach/pci.h>3635#include <mach/orion5x.h>
+1-2
arch/arm/mach-orion5x/irq.c
···99 * License version 2. This program is licensed "as is" without any1010 * warranty of any kind, whether express or implied.1111 */1212-1212+#include <linux/gpio.h>1313#include <linux/kernel.h>1414#include <linux/init.h>1515#include <linux/irq.h>1616#include <linux/io.h>1717-#include <asm/gpio.h>1817#include <mach/bridge-regs.h>1918#include <plat/irq.h>2019#include "common.h"
+1-2
arch/arm/mach-orion5x/kurobox_pro-setup.c
···77 * License version 2. This program is licensed "as is" without any88 * warranty of any kind, whether express or implied.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/kernel.h>1212#include <linux/init.h>1313#include <linux/platform_device.h>···2121#include <linux/serial_reg.h>2222#include <linux/ata_platform.h>2323#include <asm/mach-types.h>2424-#include <asm/gpio.h>2524#include <asm/mach/arch.h>2625#include <asm/mach/pci.h>2726#include <mach/orion5x.h>
+1-2
arch/arm/mach-orion5x/mv2120-setup.c
···77 * published by the Free Software Foundation; either version 2 of the88 * License, or (at your option) any later version.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/kernel.h>1212#include <linux/init.h>1313#include <linux/platform_device.h>···2020#include <linux/i2c.h>2121#include <linux/ata_platform.h>2222#include <asm/mach-types.h>2323-#include <asm/gpio.h>2423#include <asm/mach/arch.h>2524#include <mach/orion5x.h>2625#include "common.h"
+1-2
arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
···77 * License version 2. This program is licensed "as is" without any88 * warranty of any kind, whether express or implied.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/kernel.h>1212#include <linux/init.h>1313#include <linux/platform_device.h>···1818#include <linux/ethtool.h>1919#include <net/dsa.h>2020#include <asm/mach-types.h>2121-#include <asm/gpio.h>2221#include <asm/leds.h>2322#include <asm/mach/arch.h>2423#include <asm/mach/pci.h>
+1-2
arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
···77 * License version 2. This program is licensed "as is" without any88 * warranty of any kind, whether express or implied.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/kernel.h>1212#include <linux/init.h>1313#include <linux/platform_device.h>···1919#include <linux/i2c.h>2020#include <net/dsa.h>2121#include <asm/mach-types.h>2222-#include <asm/gpio.h>2322#include <asm/leds.h>2423#include <asm/mach/arch.h>2524#include <asm/mach/pci.h>
+1-2
arch/arm/mach-orion5x/rd88f5182-setup.c
···99 * License version 2. This program is licensed "as is" without any1010 * warranty of any kind, whether express or implied.1111 */1212-1212+#include <linux/gpio.h>1313#include <linux/kernel.h>1414#include <linux/init.h>1515#include <linux/platform_device.h>···2020#include <linux/ata_platform.h>2121#include <linux/i2c.h>2222#include <asm/mach-types.h>2323-#include <asm/gpio.h>2423#include <asm/leds.h>2524#include <asm/mach/arch.h>2625#include <asm/mach/pci.h>
+1-2
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
···77 * License version 2. This program is licensed "as is" without any88 * warranty of any kind, whether express or implied.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/kernel.h>1212#include <linux/init.h>1313#include <linux/platform_device.h>···2121#include <linux/ethtool.h>2222#include <net/dsa.h>2323#include <asm/mach-types.h>2424-#include <asm/gpio.h>2524#include <asm/leds.h>2625#include <asm/mach/arch.h>2726#include <asm/mach/pci.h>
+1-2
arch/arm/mach-orion5x/terastation_pro2-setup.c
···88 * as published by the Free Software Foundation; either version99 * 2 of the License, or (at your option) any later version.1010 */1111-1111+#include <linux/gpio.h>1212#include <linux/kernel.h>1313#include <linux/init.h>1414#include <linux/platform_device.h>···2020#include <linux/i2c.h>2121#include <linux/serial_reg.h>2222#include <asm/mach-types.h>2323-#include <asm/gpio.h>2423#include <asm/mach/arch.h>2524#include <asm/mach/pci.h>2625#include <mach/orion5x.h>
+1-2
arch/arm/mach-orion5x/ts209-setup.c
···88 * as published by the Free Software Foundation; either version99 * 2 of the License, or (at your option) any later version.1010 */1111-1111+#include <linux/gpio.h>1212#include <linux/kernel.h>1313#include <linux/init.h>1414#include <linux/platform_device.h>···2323#include <linux/serial_reg.h>2424#include <linux/ata_platform.h>2525#include <asm/mach-types.h>2626-#include <asm/gpio.h>2726#include <asm/mach/arch.h>2827#include <asm/mach/pci.h>2928#include <mach/orion5x.h>
+1-2
arch/arm/mach-orion5x/ts409-setup.c
···1111 * as published by the Free Software Foundation; either version1212 * 2 of the License, or (at your option) any later version.1313 */1414-1414+#include <linux/gpio.h>1515#include <linux/kernel.h>1616#include <linux/init.h>1717#include <linux/platform_device.h>···2525#include <linux/i2c.h>2626#include <linux/serial_reg.h>2727#include <asm/mach-types.h>2828-#include <asm/gpio.h>2928#include <asm/mach/arch.h>3029#include <asm/mach/pci.h>3130#include <mach/orion5x.h>
+1-2
arch/arm/mach-orion5x/wnr854t-setup.c
···55 * License version 2. This program is licensed "as is" without any66 * warranty of any kind, whether express or implied.77 */88-88+#include <linux/gpio.h>99#include <linux/kernel.h>1010#include <linux/init.h>1111#include <linux/platform_device.h>···1717#include <linux/ethtool.h>1818#include <net/dsa.h>1919#include <asm/mach-types.h>2020-#include <asm/gpio.h>2120#include <asm/mach/arch.h>2221#include <asm/mach/pci.h>2322#include <mach/orion5x.h>
+1-2
arch/arm/mach-orion5x/wrt350n-v2-setup.c
···55 * License version 2. This program is licensed "as is" without any66 * warranty of any kind, whether express or implied.77 */88-88+#include <linux/gpio.h>99#include <linux/kernel.h>1010#include <linux/init.h>1111#include <linux/platform_device.h>···2020#include <linux/input.h>2121#include <net/dsa.h>2222#include <asm/mach-types.h>2323-#include <asm/gpio.h>2423#include <asm/mach/arch.h>2524#include <asm/mach/pci.h>2625#include <mach/orion5x.h>
+1-2
arch/arm/mach-pnx4008/gpio.c
···1313 * is licensed "as is" without any warranty of any kind, whether express1414 * or implied.1515 */1616-1716#include <linux/types.h>1817#include <linux/kernel.h>1918#include <linux/module.h>2019#include <linux/io.h>2120#include <mach/hardware.h>2221#include <mach/platform.h>2323-#include <mach/gpio.h>2222+#include <mach/gpio-pnx4008.h>24232524/* register definitions */2625#define PIO_VA_BASE IO_ADDRESS(PNX4008_PIO_BASE)
···99 * it under the terms of the GNU General Public License version 2 as1010 * published by the Free Software Foundation.1111 */1212-1312#include <linux/kernel.h>1413#include <linux/types.h>1514#include <linux/io.h>···18191920#include <linux/serial_core.h>2021#include <linux/serial_reg.h>2121-#include <mach/gpio.h>22222323+#include <mach/gpio-pnx4008.h>2324#include <mach/clock.h>24252526#define UART_3 0
···1616 * initialization stuff for PXA machines which can be overridden later if1717 * need be.1818 */1919+#include <linux/gpio.h>1920#include <linux/module.h>2021#include <linux/kernel.h>2122#include <linux/init.h>···2726#include <asm/mach-types.h>28272928#include <mach/reset.h>3030-#include <mach/gpio.h>3129#include <mach/smemc.h>3230#include <mach/pxa3xx-regs.h>3331
+133
arch/arm/mach-pxa/include/mach/gpio-pxa.h
···11+/*22+ * Written by Philipp Zabel <philipp.zabel@gmail.com>33+ *44+ * This program is free software; you can redistribute it and/or modify55+ * it under the terms of the GNU General Public License as published by66+ * the Free Software Foundation; either version 2 of the License, or77+ * (at your option) any later version.88+ *99+ * This program is distributed in the hope that it will be useful,1010+ * but WITHOUT ANY WARRANTY; without even the implied warranty of1111+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1212+ * GNU General Public License for more details.1313+ *1414+ * You should have received a copy of the GNU General Public License1515+ * along with this program; if not, write to the Free Software1616+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA1717+ *1818+ */1919+#ifndef __MACH_PXA_GPIO_PXA_H2020+#define __MACH_PXA_GPIO_PXA_H2121+2222+#include <mach/irqs.h>2323+#include <mach/hardware.h>2424+2525+#define GPIO_REGS_VIRT io_p2v(0x40E00000)2626+2727+#define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))2828+#define GPIO_REG(x) (*(volatile u32 *)(GPIO_REGS_VIRT + (x)))2929+3030+/* GPIO Pin Level Registers */3131+#define GPLR0 GPIO_REG(BANK_OFF(0) + 0x00)3232+#define GPLR1 GPIO_REG(BANK_OFF(1) + 0x00)3333+#define GPLR2 GPIO_REG(BANK_OFF(2) + 0x00)3434+#define GPLR3 GPIO_REG(BANK_OFF(3) + 0x00)3535+3636+/* GPIO Pin Direction Registers */3737+#define GPDR0 GPIO_REG(BANK_OFF(0) + 0x0c)3838+#define GPDR1 GPIO_REG(BANK_OFF(1) + 0x0c)3939+#define GPDR2 GPIO_REG(BANK_OFF(2) + 0x0c)4040+#define GPDR3 GPIO_REG(BANK_OFF(3) + 0x0c)4141+4242+/* GPIO Pin Output Set Registers */4343+#define GPSR0 GPIO_REG(BANK_OFF(0) + 0x18)4444+#define GPSR1 GPIO_REG(BANK_OFF(1) + 0x18)4545+#define GPSR2 GPIO_REG(BANK_OFF(2) + 0x18)4646+#define GPSR3 GPIO_REG(BANK_OFF(3) + 0x18)4747+4848+/* GPIO Pin Output Clear Registers */4949+#define GPCR0 GPIO_REG(BANK_OFF(0) + 0x24)5050+#define GPCR1 GPIO_REG(BANK_OFF(1) + 0x24)5151+#define GPCR2 GPIO_REG(BANK_OFF(2) + 0x24)5252+#define GPCR3 GPIO_REG(BANK_OFF(3) + 0x24)5353+5454+/* GPIO Rising Edge Detect Registers */5555+#define GRER0 GPIO_REG(BANK_OFF(0) + 0x30)5656+#define GRER1 GPIO_REG(BANK_OFF(1) + 0x30)5757+#define GRER2 GPIO_REG(BANK_OFF(2) + 0x30)5858+#define GRER3 GPIO_REG(BANK_OFF(3) + 0x30)5959+6060+/* GPIO Falling Edge Detect Registers */6161+#define GFER0 GPIO_REG(BANK_OFF(0) + 0x3c)6262+#define GFER1 GPIO_REG(BANK_OFF(1) + 0x3c)6363+#define GFER2 GPIO_REG(BANK_OFF(2) + 0x3c)6464+#define GFER3 GPIO_REG(BANK_OFF(3) + 0x3c)6565+6666+/* GPIO Edge Detect Status Registers */6767+#define GEDR0 GPIO_REG(BANK_OFF(0) + 0x48)6868+#define GEDR1 GPIO_REG(BANK_OFF(1) + 0x48)6969+#define GEDR2 GPIO_REG(BANK_OFF(2) + 0x48)7070+#define GEDR3 GPIO_REG(BANK_OFF(3) + 0x48)7171+7272+/* GPIO Alternate Function Select Registers */7373+#define GAFR0_L GPIO_REG(0x0054)7474+#define GAFR0_U GPIO_REG(0x0058)7575+#define GAFR1_L GPIO_REG(0x005C)7676+#define GAFR1_U GPIO_REG(0x0060)7777+#define GAFR2_L GPIO_REG(0x0064)7878+#define GAFR2_U GPIO_REG(0x0068)7979+#define GAFR3_L GPIO_REG(0x006C)8080+#define GAFR3_U GPIO_REG(0x0070)8181+8282+/* More handy macros. The argument is a literal GPIO number. */8383+8484+#define GPIO_bit(x) (1 << ((x) & 0x1f))8585+8686+#define GPLR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x00)8787+#define GPDR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x0c)8888+#define GPSR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x18)8989+#define GPCR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x24)9090+#define GRER(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x30)9191+#define GFER(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x3c)9292+#define GEDR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x48)9393+#define GAFR(x) GPIO_REG(0x54 + (((x) & 0x70) >> 2))9494+9595+9696+#define NR_BUILTIN_GPIO PXA_GPIO_IRQ_NUM9797+9898+#define gpio_to_bank(gpio) ((gpio) >> 5)9999+100100+#ifdef CONFIG_CPU_PXA26x101101+/* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted,102102+ * as well as their Alternate Function value being '1' for GPIO in GAFRx.103103+ */104104+static inline int __gpio_is_inverted(unsigned gpio)105105+{106106+ return cpu_is_pxa25x() && gpio > 85;107107+}108108+#else109109+static inline int __gpio_is_inverted(unsigned gpio) { return 0; }110110+#endif111111+112112+/*113113+ * On PXA25x and PXA27x, GAFRx and GPDRx together decide the alternate114114+ * function of a GPIO, and GPDRx cannot be altered once configured. It115115+ * is attributed as "occupied" here (I know this terminology isn't116116+ * accurate, you are welcome to propose a better one :-)117117+ */118118+static inline int __gpio_is_occupied(unsigned gpio)119119+{120120+ if (cpu_is_pxa27x() || cpu_is_pxa25x()) {121121+ int af = (GAFR(gpio) >> ((gpio & 0xf) * 2)) & 0x3;122122+ int dir = GPDR(gpio) & GPIO_bit(gpio);123123+124124+ if (__gpio_is_inverted(gpio))125125+ return af != 1 || dir == 0;126126+ else127127+ return af != 0 || dir != 0;128128+ } else129129+ return GPDR(gpio) & GPIO_bit(gpio);130130+}131131+132132+#include <plat/gpio-pxa.h>133133+#endif /* __MACH_PXA_GPIO_PXA_H */
+2-108
arch/arm/mach-pxa/include/mach/gpio.h
···2424#ifndef __ASM_ARCH_PXA_GPIO_H2525#define __ASM_ARCH_PXA_GPIO_H26262727-#include <mach/irqs.h>2828-#include <mach/hardware.h>2927#include <asm-generic/gpio.h>2828+/* The defines for the driver are needed for the accelerated accessors */2929+#include "gpio-pxa.h"30303131-#define GPIO_REGS_VIRT io_p2v(0x40E00000)3232-3333-#define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))3434-#define GPIO_REG(x) (*(volatile u32 *)(GPIO_REGS_VIRT + (x)))3535-3636-/* GPIO Pin Level Registers */3737-#define GPLR0 GPIO_REG(BANK_OFF(0) + 0x00)3838-#define GPLR1 GPIO_REG(BANK_OFF(1) + 0x00)3939-#define GPLR2 GPIO_REG(BANK_OFF(2) + 0x00)4040-#define GPLR3 GPIO_REG(BANK_OFF(3) + 0x00)4141-4242-/* GPIO Pin Direction Registers */4343-#define GPDR0 GPIO_REG(BANK_OFF(0) + 0x0c)4444-#define GPDR1 GPIO_REG(BANK_OFF(1) + 0x0c)4545-#define GPDR2 GPIO_REG(BANK_OFF(2) + 0x0c)4646-#define GPDR3 GPIO_REG(BANK_OFF(3) + 0x0c)4747-4848-/* GPIO Pin Output Set Registers */4949-#define GPSR0 GPIO_REG(BANK_OFF(0) + 0x18)5050-#define GPSR1 GPIO_REG(BANK_OFF(1) + 0x18)5151-#define GPSR2 GPIO_REG(BANK_OFF(2) + 0x18)5252-#define GPSR3 GPIO_REG(BANK_OFF(3) + 0x18)5353-5454-/* GPIO Pin Output Clear Registers */5555-#define GPCR0 GPIO_REG(BANK_OFF(0) + 0x24)5656-#define GPCR1 GPIO_REG(BANK_OFF(1) + 0x24)5757-#define GPCR2 GPIO_REG(BANK_OFF(2) + 0x24)5858-#define GPCR3 GPIO_REG(BANK_OFF(3) + 0x24)5959-6060-/* GPIO Rising Edge Detect Registers */6161-#define GRER0 GPIO_REG(BANK_OFF(0) + 0x30)6262-#define GRER1 GPIO_REG(BANK_OFF(1) + 0x30)6363-#define GRER2 GPIO_REG(BANK_OFF(2) + 0x30)6464-#define GRER3 GPIO_REG(BANK_OFF(3) + 0x30)6565-6666-/* GPIO Falling Edge Detect Registers */6767-#define GFER0 GPIO_REG(BANK_OFF(0) + 0x3c)6868-#define GFER1 GPIO_REG(BANK_OFF(1) + 0x3c)6969-#define GFER2 GPIO_REG(BANK_OFF(2) + 0x3c)7070-#define GFER3 GPIO_REG(BANK_OFF(3) + 0x3c)7171-7272-/* GPIO Edge Detect Status Registers */7373-#define GEDR0 GPIO_REG(BANK_OFF(0) + 0x48)7474-#define GEDR1 GPIO_REG(BANK_OFF(1) + 0x48)7575-#define GEDR2 GPIO_REG(BANK_OFF(2) + 0x48)7676-#define GEDR3 GPIO_REG(BANK_OFF(3) + 0x48)7777-7878-/* GPIO Alternate Function Select Registers */7979-#define GAFR0_L GPIO_REG(0x0054)8080-#define GAFR0_U GPIO_REG(0x0058)8181-#define GAFR1_L GPIO_REG(0x005C)8282-#define GAFR1_U GPIO_REG(0x0060)8383-#define GAFR2_L GPIO_REG(0x0064)8484-#define GAFR2_U GPIO_REG(0x0068)8585-#define GAFR3_L GPIO_REG(0x006C)8686-#define GAFR3_U GPIO_REG(0x0070)8787-8888-/* More handy macros. The argument is a literal GPIO number. */8989-9090-#define GPIO_bit(x) (1 << ((x) & 0x1f))9191-9292-#define GPLR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x00)9393-#define GPDR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x0c)9494-#define GPSR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x18)9595-#define GPCR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x24)9696-#define GRER(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x30)9797-#define GFER(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x3c)9898-#define GEDR(x) GPIO_REG(BANK_OFF((x) >> 5) + 0x48)9999-#define GAFR(x) GPIO_REG(0x54 + (((x) & 0x70) >> 2))100100-101101-102102-#define NR_BUILTIN_GPIO PXA_GPIO_IRQ_NUM103103-104104-#define gpio_to_bank(gpio) ((gpio) >> 5)10531#define gpio_to_irq(gpio) IRQ_GPIO(gpio)1063210733static inline int irq_to_gpio(unsigned int irq)···42116 return gpio;4311744118 return -1;4545-}4646-4747-#ifdef CONFIG_CPU_PXA26x4848-/* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted,4949- * as well as their Alternate Function value being '1' for GPIO in GAFRx.5050- */5151-static inline int __gpio_is_inverted(unsigned gpio)5252-{5353- return cpu_is_pxa25x() && gpio > 85;5454-}5555-#else5656-static inline int __gpio_is_inverted(unsigned gpio) { return 0; }5757-#endif5858-5959-/*6060- * On PXA25x and PXA27x, GAFRx and GPDRx together decide the alternate6161- * function of a GPIO, and GPDRx cannot be altered once configured. It6262- * is attributed as "occupied" here (I know this terminology isn't6363- * accurate, you are welcome to propose a better one :-)6464- */6565-static inline int __gpio_is_occupied(unsigned gpio)6666-{6767- if (cpu_is_pxa27x() || cpu_is_pxa25x()) {6868- int af = (GAFR(gpio) >> ((gpio & 0xf) * 2)) & 0x3;6969- int dir = GPDR(gpio) & GPIO_bit(gpio);7070-7171- if (__gpio_is_inverted(gpio))7272- return af != 1 || dir == 0;7373- else7474- return af != 0 || dir != 0;7575- } else7676- return GPDR(gpio) & GPIO_bit(gpio);77119}7812079121#include <plat/gpio.h>
···1111 * it under the terms of the GNU General Public License version 2 as1212 * published by the Free Software Foundation.1313 */1414-1514#include <linux/init.h>1615#include <linux/module.h>1716#include <linux/interrupt.h>···20212122#include <mach/hardware.h>2223#include <mach/irqs.h>2323-#include <mach/gpio.h>2424+#include <mach/gpio-pxa.h>24252526#include "generic.h"2627
+1-2
arch/arm/mach-pxa/lpd270.c
···1212 * it under the terms of the GNU General Public License version 2 as1313 * published by the Free Software Foundation.1414 */1515-1515+#include <linux/gpio.h>1616#include <linux/init.h>1717#include <linux/platform_device.h>1818#include <linux/syscore_ops.h>···3939#include <asm/mach/flash.h>40404141#include <mach/pxa27x.h>4242-#include <mach/gpio.h>4342#include <mach/lpd270.h>4443#include <mach/audio.h>4544#include <mach/pxafb.h>
+1-1
arch/arm/mach-pxa/lubbock.c
···1111 * it under the terms of the GNU General Public License version 2 as1212 * published by the Free Software Foundation.1313 */1414+#include <linux/gpio.h>1415#include <linux/module.h>1516#include <linux/kernel.h>1617#include <linux/init.h>···4342#include <asm/hardware/sa1111.h>44434544#include <mach/pxa25x.h>4646-#include <mach/gpio.h>4745#include <mach/audio.h>4846#include <mach/lubbock.h>4947#include <mach/udc.h>
+1-2
arch/arm/mach-pxa/mainstone.c
···1212 * it under the terms of the GNU General Public License version 2 as1313 * published by the Free Software Foundation.1414 */1515-1515+#include <linux/gpio.h>1616#include <linux/init.h>1717#include <linux/platform_device.h>1818#include <linux/syscore_ops.h>···4343#include <asm/mach/flash.h>44444545#include <mach/pxa27x.h>4646-#include <mach/gpio.h>4746#include <mach/mainstone.h>4847#include <mach/audio.h>4948#include <mach/pxafb.h>
+2-2
arch/arm/mach-pxa/mfp-pxa2xx.c
···1212 * it under the terms of the GNU General Public License version 2 as1313 * published by the Free Software Foundation.1414 */1515-1515+#include <linux/gpio.h>1616#include <linux/module.h>1717#include <linux/kernel.h>1818#include <linux/init.h>1919#include <linux/syscore_ops.h>20202121-#include <mach/gpio.h>2221#include <mach/pxa2xx-regs.h>2322#include <mach/mfp-pxa2xx.h>2323+#include <mach/gpio-pxa.h>24242525#include "generic.h"2626
+1-2
arch/arm/mach-pxa/pcm990-baseboard.c
···1919 * it under the terms of the GNU General Public License version 2 as2020 * published by the Free Software Foundation.2121 */2222-2222+#include <linux/gpio.h>2323#include <linux/irq.h>2424#include <linux/platform_device.h>2525#include <linux/i2c.h>···28282929#include <media/soc_camera.h>30303131-#include <asm/gpio.h>3231#include <mach/camera.h>3332#include <asm/mach/map.h>3433#include <mach/pxa27x.h>
+2-1
arch/arm/mach-pxa/pxa25x.c
···1616 * initialization stuff for PXA machines which can be overridden later if1717 * need be.1818 */1919+#include <linux/gpio.h>1920#include <linux/module.h>2021#include <linux/kernel.h>2122#include <linux/init.h>···2423#include <linux/suspend.h>2524#include <linux/syscore_ops.h>2625#include <linux/irq.h>2626+#include <linux/gpio.h>27272828#include <asm/mach/map.h>2929#include <asm/suspend.h>3030#include <mach/hardware.h>3131#include <mach/irqs.h>3232-#include <mach/gpio.h>3332#include <mach/pxa25x.h>3433#include <mach/reset.h>3534#include <mach/pm.h>
+2-1
arch/arm/mach-pxa/pxa27x.c
···1111 * it under the terms of the GNU General Public License version 2 as1212 * published by the Free Software Foundation.1313 */1414+#include <linux/gpio.h>1415#include <linux/module.h>1516#include <linux/kernel.h>1617#include <linux/init.h>···2120#include <linux/io.h>2221#include <linux/irq.h>2322#include <linux/i2c/pxa-i2c.h>2323+#include <linux/gpio.h>24242525#include <asm/mach/map.h>2626#include <mach/hardware.h>2727#include <asm/irq.h>2828#include <asm/suspend.h>2929#include <mach/irqs.h>3030-#include <mach/gpio.h>3130#include <mach/pxa27x.h>3231#include <mach/reset.h>3332#include <mach/ohci.h>
+1-2
arch/arm/mach-pxa/pxa3xx.c
···1212 * it under the terms of the GNU General Public License version 2 as1313 * published by the Free Software Foundation.1414 */1515-1615#include <linux/module.h>1716#include <linux/kernel.h>1817#include <linux/init.h>···2526#include <asm/mach/map.h>2627#include <asm/suspend.h>2728#include <mach/hardware.h>2828-#include <mach/gpio.h>2929+#include <mach/gpio-pxa.h>2930#include <mach/pxa3xx-regs.h>3031#include <mach/reset.h>3132#include <mach/ohci.h>
+1-2
arch/arm/mach-pxa/pxa95x.c
···99 * it under the terms of the GNU General Public License version 2 as1010 * published by the Free Software Foundation.1111 */1212-1312#include <linux/module.h>1413#include <linux/kernel.h>1514#include <linux/init.h>···2021#include <linux/syscore_ops.h>21222223#include <mach/hardware.h>2323-#include <mach/gpio.h>2424+#include <mach/gpio-pxa.h>2425#include <mach/pxa3xx-regs.h>2526#include <mach/pxa930.h>2627#include <mach/reset.h>
+2-2
arch/arm/mach-pxa/saarb.c
···99 * it under the terms of the GNU General Public License version 2 as1010 * publishhed by the Free Software Foundation.1111 */1212-1212+#include <linux/gpio.h>1313#include <linux/init.h>1414#include <linux/kernel.h>1515#include <linux/i2c.h>1616#include <linux/i2c/pxa-i2c.h>1717#include <linux/mfd/88pm860x.h>1818+#include <linux/gpio.h>18191920#include <asm/mach-types.h>2021#include <asm/mach/arch.h>···2423#include <mach/hardware.h>2524#include <mach/mfp.h>2625#include <mach/mfp-pxa930.h>2727-#include <mach/gpio.h>28262927#include "generic.h"3028
···1111 * published by the Free Software Foundation.1212*/13131414-#define gpio_get_value __gpio_get_value1515-#define gpio_set_value __gpio_set_value1616-#define gpio_cansleep __gpio_cansleep1717-#define gpio_to_irq __gpio_to_irq1818-1914/* some boards require extra gpio capacity to support external2015 * devices that need GPIO.2116 */···2328#define ARCH_NR_GPIOS (256 + CONFIG_S3C24XX_GPIO_EXTRA)2429#endif25302626-#include <asm-generic/gpio.h>2731#include <mach/gpio-nrs.h>2832#include <mach/gpio-fns.h>2933
···1212 * published by the Free Software Foundation.1313*/14141515-#define gpio_get_value __gpio_get_value1616-#define gpio_set_value __gpio_set_value1717-#define gpio_cansleep __gpio_cansleep1818-#define gpio_to_irq __gpio_to_irq1919-2015/* GPIO bank sizes */2116#define S3C64XX_GPIO_A_NR (8)2217#define S3C64XX_GPIO_B_NR (7)···9196#define BOARD_NR_GPIOS 1692979398#define ARCH_NR_GPIOS (GPIO_BOARD_START + BOARD_NR_GPIOS)9494-9595-#include <asm-generic/gpio.h>
-7
arch/arm/mach-s5p64x0/include/mach/gpio.h
···1313#ifndef __ASM_ARCH_GPIO_H1414#define __ASM_ARCH_GPIO_H __FILE__15151616-#define gpio_get_value __gpio_get_value1717-#define gpio_set_value __gpio_set_value1818-#define gpio_cansleep __gpio_cansleep1919-#define gpio_to_irq __gpio_to_irq2020-2116/* GPIO bank sizes */22172318#define S5P6440_GPIO_A_NR (6)···128133/* define the number of gpios we need to the one after the last GPIO range */129134130135#define ARCH_NR_GPIOS (S5P64X0_GPIO_END + CONFIG_SAMSUNG_GPIO_EXTRA)131131-132132-#include <asm-generic/gpio.h>133136134137#endif /* __ASM_ARCH_GPIO_H */
-7
arch/arm/mach-s5pc100/include/mach/gpio.h
···1515#ifndef __ASM_ARCH_GPIO_H1616#define __ASM_ARCH_GPIO_H __FILE__17171818-#define gpio_get_value __gpio_get_value1919-#define gpio_set_value __gpio_set_value2020-#define gpio_cansleep __gpio_cansleep2121-#define gpio_to_irq __gpio_to_irq2222-2318/* GPIO bank sizes */2419#define S5PC100_GPIO_A0_NR (8)2520#define S5PC100_GPIO_A1_NR (5)···140145141146/* define the number of gpios we need to the one after the MP04() range */142147#define ARCH_NR_GPIOS (S5PC100_GPIO_END + 1)143143-144144-#include <asm-generic/gpio.h>145148146149#endif /* __ASM_ARCH_GPIO_H */
-7
arch/arm/mach-s5pv210/include/mach/gpio.h
···1313#ifndef __ASM_ARCH_GPIO_H1414#define __ASM_ARCH_GPIO_H __FILE__15151616-#define gpio_get_value __gpio_get_value1717-#define gpio_set_value __gpio_set_value1818-#define gpio_cansleep __gpio_cansleep1919-#define gpio_to_irq __gpio_to_irq2020-2116/* Practically, GPIO banks up to MP03 are the configurable gpio banks */22172318/* GPIO bank sizes */···136141/* define the number of gpios we need to the one after the MP05() range */137142#define ARCH_NR_GPIOS (S5PV210_MP05(S5PV210_GPIO_MP05_NR) + \138143 CONFIG_SAMSUNG_GPIO_EXTRA + 1)139139-140140-#include <asm-generic/gpio.h>141144142145#endif /* __ASM_ARCH_GPIO_H */
···99 * it under the terms of the GNU General Public License version 2 as1010 * published by the Free Software Foundation.1111 */1212+#include <linux/gpio.h>1213#include <linux/module.h>1314#include <linux/kernel.h>1415#include <linux/init.h>···2524#include <asm/mach/map.h>2625#include <asm/mach/flash.h>2726#include <asm/irq.h>2828-#include <asm/gpio.h>29273028#include "generic.h"3129
···77 * it under the terms of the GNU General Public License version 2 as88 * published by the Free Software Foundation.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/init.h>1212#include <linux/module.h>13131414-#include <asm/gpio.h>1514#include <mach/hardware.h>1616-#include "generic.h"17151816static int sa1100_gpio_get(struct gpio_chip *chip, unsigned offset)1917{
···1313 * GNU General Public License for more details.1414 *1515 */1616-1616+#include <linux/gpio.h>1717#include <linux/kernel.h>1818#include <linux/init.h>19192020#include <mach/pinmux.h>2121-#include <mach/gpio.h>22212322#include "gpio-names.h"2423#include "board-trimslice.h"
···11+/*22+ * arch/arm/mach-tegra/include/mach/gpio.h33+ *44+ * Copyright (C) 2010 Google, Inc.55+ *66+ * Author:77+ * Erik Gilling <konkers@google.com>88+ *99+ * This software is licensed under the terms of the GNU General Public1010+ * License version 2, as published by the Free Software Foundation, and1111+ * may be copied, distributed, and modified under those terms.1212+ *1313+ * This program is distributed in the hope that it will be useful,1414+ * but WITHOUT ANY WARRANTY; without even the implied warranty of1515+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1616+ * GNU General Public License for more details.1717+ *1818+ */1919+2020+#ifndef __MACH_TEGRA_GPIO_TEGRA_H2121+#define __MACH_TEGRA_GPIO_TEGRA_H2222+2323+#include <linux/types.h>2424+#include <mach/irqs.h>2525+2626+#define TEGRA_NR_GPIOS INT_GPIO_NR2727+2828+#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))2929+3030+struct tegra_gpio_table {3131+ int gpio; /* GPIO number */3232+ bool enable; /* Enable for GPIO at init? */3333+};3434+3535+void tegra_gpio_config(struct tegra_gpio_table *table, int num);3636+void tegra_gpio_enable(int gpio);3737+void tegra_gpio_disable(int gpio);3838+3939+#endif
-60
arch/arm/mach-tegra/include/mach/gpio.h
···11-/*22- * arch/arm/mach-tegra/include/mach/gpio.h33- *44- * Copyright (C) 2010 Google, Inc.55- *66- * Author:77- * Erik Gilling <konkers@google.com>88- *99- * This software is licensed under the terms of the GNU General Public1010- * License version 2, as published by the Free Software Foundation, and1111- * may be copied, distributed, and modified under those terms.1212- *1313- * This program is distributed in the hope that it will be useful,1414- * but WITHOUT ANY WARRANTY; without even the implied warranty of1515- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1616- * GNU General Public License for more details.1717- *1818- */1919-2020-#ifndef __MACH_TEGRA_GPIO_H2121-#define __MACH_TEGRA_GPIO_H2222-2323-#include <linux/init.h>2424-#include <mach/irqs.h>2525-2626-#define TEGRA_NR_GPIOS INT_GPIO_NR2727-2828-#include <asm-generic/gpio.h>2929-3030-#define gpio_get_value __gpio_get_value3131-#define gpio_set_value __gpio_set_value3232-#define gpio_cansleep __gpio_cansleep3333-3434-#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))3535-#define TEGRA_IRQ_TO_GPIO(irq) ((irq) - INT_GPIO_BASE)3636-3737-static inline int gpio_to_irq(unsigned int gpio)3838-{3939- if (gpio < TEGRA_NR_GPIOS)4040- return INT_GPIO_BASE + gpio;4141- return -EINVAL;4242-}4343-4444-static inline int irq_to_gpio(unsigned int irq)4545-{4646- if ((irq >= INT_GPIO_BASE) && (irq < INT_GPIO_BASE + INT_GPIO_NR))4747- return irq - INT_GPIO_BASE;4848- return -EINVAL;4949-}5050-5151-struct tegra_gpio_table {5252- int gpio; /* GPIO number */5353- bool enable; /* Enable for GPIO at init? */5454-};5555-5656-void tegra_gpio_config(struct tegra_gpio_table *table, int num);5757-void tegra_gpio_enable(int gpio);5858-void tegra_gpio_disable(int gpio);5959-6060-#endif
···44 * Board data for the U8500 UIB, also known as the New UIB55 * License terms: GNU General Public License (GPL), version 266 */77-77+#include <linux/gpio.h>88#include <linux/kernel.h>99#include <linux/init.h>1010#include <linux/i2c.h>···1313#include <linux/mfd/tc3589x.h>1414#include <linux/input/matrix_keypad.h>15151616-#include <mach/gpio.h>1716#include <mach/irqs.h>18171918#include "board-mop500.h"
···11-/*22- * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved.33- * Copyright 2008 Juergen Beisert, kernel@pengutronix.de44- *55- * This program is free software; you can redistribute it and/or66- * modify it under the terms of the GNU General Public License77- * as published by the Free Software Foundation; either version 288- * of the License, or (at your option) any later version.99- * This program is distributed in the hope that it will be useful,1010- * but WITHOUT ANY WARRANTY; without even the implied warranty of1111- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1212- * GNU General Public License for more details.1313- *1414- * You should have received a copy of the GNU General Public License1515- * along with this program; if not, write to the Free Software1616- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.1717- */1818-1919-#ifndef __ASM_ARCH_MXC_GPIO_H__2020-#define __ASM_ARCH_MXC_GPIO_H__2121-2222-#include <linux/spinlock.h>2323-#include <mach/hardware.h>2424-#include <asm-generic/gpio.h>2525-2626-/* use gpiolib dispatchers */2727-#define gpio_get_value __gpio_get_value2828-#define gpio_set_value __gpio_set_value2929-#define gpio_cansleep __gpio_cansleep3030-#define gpio_to_irq __gpio_to_irq3131-3232-#endif11+/* empty */
···99 * it under the terms of the GNU General Public License version 2 as1010 * published by the Free Software Foundation.1111 */1212-#ifndef __ASM_PLAT_GPIO_H1313-#define __ASM_PLAT_GPIO_H14121515-#include <asm-generic/gpio.h>1616-1717-/*1818- * These currently cause a function call to happen, they may be optimized1919- * if needed by adding cpu-specific defines to identify blocks2020- * (see mach-pxa/include/mach/gpio.h as an example using GPLR etc)2121- */2222-#define gpio_get_value __gpio_get_value2323-#define gpio_set_value __gpio_set_value2424-#define gpio_cansleep __gpio_cansleep2525-#define gpio_to_irq __gpio_to_irq1313+#ifndef __PLAT_NOMADIK_GPIO1414+#define __PLAT_NOMADIK_GPIO26152716/*2817 * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving···8293 bool supports_sleepmode;8394};84958585-#endif /* __ASM_PLAT_GPIO_H */9696+#endif /* __PLAT_NOMADIK_GPIO */
+1-2
arch/arm/plat-omap/debug-devices.c
···88 * it under the terms of the GNU General Public License version 2 as99 * published by the Free Software Foundation.1010 */1111-1111+#include <linux/gpio.h>1212#include <linux/kernel.h>1313#include <linux/init.h>1414#include <linux/platform_device.h>···1818#include <mach/hardware.h>19192020#include <plat/board.h>2121-#include <mach/gpio.h>222123222423/* Many OMAP development platforms reuse the same "debug board"; these
+1-2
arch/arm/plat-omap/debug-leds.c
···77 * it under the terms of the GNU General Public License version 2 as88 * published by the Free Software Foundation.99 */1010-1010+#include <linux/gpio.h>1111#include <linux/init.h>1212#include <linux/platform_device.h>1313#include <linux/leds.h>···1919#include <asm/mach-types.h>20202121#include <plat/fpga.h>2222-#include <mach/gpio.h>232224232524/* Many OMAP development platforms reuse the same "debug board"; these
+1-2
arch/arm/plat-omap/devices.c
···88 * the Free Software Foundation; either version 2 of the License, or99 * (at your option) any later version.1010 */1111-1111+#include <linux/gpio.h>1212#include <linux/module.h>1313#include <linux/kernel.h>1414#include <linux/init.h>···2424#include <plat/tc.h>2525#include <plat/board.h>2626#include <plat/mmc.h>2727-#include <mach/gpio.h>2827#include <plat/menelaus.h>2928#include <plat/mcbsp.h>3029#include <plat/omap44xx.h>
-20
arch/arm/plat-omap/include/plat/gpio.h
···222222#include <linux/errno.h>223223#include <asm-generic/gpio.h>224224225225-static inline int gpio_get_value(unsigned gpio)226226-{227227- return __gpio_get_value(gpio);228228-}229229-230230-static inline void gpio_set_value(unsigned gpio, int value)231231-{232232- __gpio_set_value(gpio, value);233233-}234234-235235-static inline int gpio_cansleep(unsigned gpio)236236-{237237- return __gpio_cansleep(gpio);238238-}239239-240240-static inline int gpio_to_irq(unsigned gpio)241241-{242242- return __gpio_to_irq(gpio);243243-}244244-245225static inline int irq_to_gpio(unsigned irq)246226{247227 int tmp;
···1111 * it under the terms of the GNU General Public License version 2 as1212 * published by the Free Software Foundation.1313 */1414-1414+#include <linux/gpio.h>1515#include <linux/init.h>1616#include <linux/irq.h>1717#include <linux/io.h>1818#include <linux/syscore_ops.h>1919#include <linux/slab.h>20202121-#include <mach/gpio.h>2121+#include <mach/gpio-pxa.h>22222323int pxa_last_gpio;2424
+44
arch/arm/plat-pxa/include/plat/gpio-pxa.h
···11+#ifndef __PLAT_PXA_GPIO_H22+#define __PLAT_PXA_GPIO_H33+44+struct irq_data;55+66+/*77+ * We handle the GPIOs by banks, each bank covers up to 32 GPIOs with88+ * one set of registers. The register offsets are organized below:99+ *1010+ * GPLR GPDR GPSR GPCR GRER GFER GEDR1111+ * BANK 0 - 0x0000 0x000C 0x0018 0x0024 0x0030 0x003C 0x00481212+ * BANK 1 - 0x0004 0x0010 0x001C 0x0028 0x0034 0x0040 0x004C1313+ * BANK 2 - 0x0008 0x0014 0x0020 0x002C 0x0038 0x0044 0x00501414+ *1515+ * BANK 3 - 0x0100 0x010C 0x0118 0x0124 0x0130 0x013C 0x01481616+ * BANK 4 - 0x0104 0x0110 0x011C 0x0128 0x0134 0x0140 0x014C1717+ * BANK 5 - 0x0108 0x0114 0x0120 0x012C 0x0138 0x0144 0x01501818+ *1919+ * NOTE:2020+ * BANK 3 is only available on PXA27x and later processors.2121+ * BANK 4 and 5 are only available on PXA9352222+ */2323+2424+#define GPIO_BANK(n) (GPIO_REGS_VIRT + BANK_OFF(n))2525+2626+#define GPLR_OFFSET 0x002727+#define GPDR_OFFSET 0x0C2828+#define GPSR_OFFSET 0x182929+#define GPCR_OFFSET 0x243030+#define GRER_OFFSET 0x303131+#define GFER_OFFSET 0x3C3232+#define GEDR_OFFSET 0x483333+3434+/* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85).3535+ * Those cases currently cause holes in the GPIO number space, the3636+ * actual number of the last GPIO is recorded by 'pxa_last_gpio'.3737+ */3838+extern int pxa_last_gpio;3939+4040+typedef int (*set_wake_t)(struct irq_data *d, unsigned int on);4141+4242+extern void pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn);4343+4444+#endif /* __PLAT_PXA_GPIO_H */
+3-37
arch/arm/plat-pxa/include/plat/gpio.h
···11#ifndef __PLAT_GPIO_H22#define __PLAT_GPIO_H3344-struct irq_data;44+#define __ARM_GPIOLIB_COMPLEX5566-/*77- * We handle the GPIOs by banks, each bank covers up to 32 GPIOs with88- * one set of registers. The register offsets are organized below:99- *1010- * GPLR GPDR GPSR GPCR GRER GFER GEDR1111- * BANK 0 - 0x0000 0x000C 0x0018 0x0024 0x0030 0x003C 0x00481212- * BANK 1 - 0x0004 0x0010 0x001C 0x0028 0x0034 0x0040 0x004C1313- * BANK 2 - 0x0008 0x0014 0x0020 0x002C 0x0038 0x0044 0x00501414- *1515- * BANK 3 - 0x0100 0x010C 0x0118 0x0124 0x0130 0x013C 0x01481616- * BANK 4 - 0x0104 0x0110 0x011C 0x0128 0x0134 0x0140 0x014C1717- * BANK 5 - 0x0108 0x0114 0x0120 0x012C 0x0138 0x0144 0x01501818- *1919- * NOTE:2020- * BANK 3 is only available on PXA27x and later processors.2121- * BANK 4 and 5 are only available on PXA9352222- */2323-2424-#define GPIO_BANK(n) (GPIO_REGS_VIRT + BANK_OFF(n))2525-2626-#define GPLR_OFFSET 0x002727-#define GPDR_OFFSET 0x0C2828-#define GPSR_OFFSET 0x182929-#define GPCR_OFFSET 0x243030-#define GRER_OFFSET 0x303131-#define GFER_OFFSET 0x3C3232-#define GEDR_OFFSET 0x4866+/* The individual machine provides register offsets and NR_BUILTIN_GPIO */77+#include <mach/gpio-pxa.h>338349static inline int gpio_get_value(unsigned gpio)3510{···27522853#define gpio_cansleep __gpio_cansleep29543030-/* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85).3131- * Those cases currently cause holes in the GPIO number space, the3232- * actual number of the last GPIO is recorded by 'pxa_last_gpio'.3333- */3434-extern int pxa_last_gpio;3535-3636-typedef int (*set_wake_t)(struct irq_data *d, unsigned int on);3737-3838-extern void pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn);3955#endif /* __PLAT_GPIO_H */
+1-24
arch/arm/plat-spear/include/plat/gpio.h
···11-/*22- * arch/arm/plat-spear/include/plat/gpio.h33- *44- * GPIO macros for SPEAr platform55- *66- * Copyright (C) 2009 ST Microelectronics77- * Viresh Kumar<viresh.kumar@st.com>88- *99- * This file is licensed under the terms of the GNU General Public1010- * License version 2. This program is licensed "as is" without any1111- * warranty of any kind, whether express or implied.1212- */1313-1414-#ifndef __PLAT_GPIO_H1515-#define __PLAT_GPIO_H1616-1717-#include <asm-generic/gpio.h>1818-1919-#define gpio_get_value __gpio_get_value2020-#define gpio_set_value __gpio_set_value2121-#define gpio_cansleep __gpio_cansleep2222-#define gpio_to_irq __gpio_to_irq2323-2424-#endif /* __PLAT_GPIO_H */11+/* empty */
···178178 The Intel Tunnel Creek processor has 5 GPIOs powered by the179179 core power rail and 9 from suspend power supply.180180181181+config GPIO_U300182182+ bool "ST-Ericsson U300 COH 901 335/571 GPIO"183183+ depends on GPIOLIB && ARCH_U300184184+ help185185+ Say yes here to support GPIO interface on ST-Ericsson U300.186186+ The names of the two IP block variants supported are187187+ COH 901 335 and COH 901 571/3. They contain 3, 5 or 7188188+ ports of 8 GPIO pins each.189189+181190config GPIO_VX855182191 tristate "VIA VX855/VX875 GPIO"183192 depends on MFD_SUPPORT && PCI
···2727#include <asm/mach/irq.h>28282929#include <plat/pincfg.h>3030+#include <plat/gpio-nomadik.h>3031#include <mach/hardware.h>3131-#include <mach/gpio.h>3232+#include <asm/gpio.h>32333334/*3435 * The GPIO module in the Nomadik family of Systems-on-Chip is an