File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717#include <linux/mtd/partitions.h>
1818#include <linux/mtd/nand.h>
1919#include <linux/interrupt.h>
20+ #include <linux/gpio.h>
2021
2122#include <asm/mach-types.h>
2223#include <asm/mach/arch.h>
Original file line number Diff line number Diff line change 1414#include <linux/kernel.h>
1515#include <linux/platform_device.h>
1616#include <linux/io.h>
17- #include <linux/gpio.h>
1817#include <linux/regulator/machine.h>
1918#include <linux/regulator/max8649.h>
2019#include <linux/regulator/fixed.h>
Original file line number Diff line number Diff line change 99 */
1010
1111#include <linux/init.h>
12+ #include <linux/gpio.h>
1213
1314#include <asm/mach/arch.h>
1415#include <asm/mach-types.h>
1516
16- #include <mach/gpio.h>
1717#include <mach/pxa168.h>
1818#include <mach/mfp-pxa168.h>
1919#include <mach/mfp-gplugd.h>
Original file line number Diff line number Diff line change 1+ #ifndef __ASM_MACH_GPIO_PXA_H
2+ #define __ASM_MACH_GPIO_PXA_H
3+
4+ #include <mach/addr-map.h>
5+ #include <mach/irqs.h>
6+
7+ #define GPIO_REGS_VIRT (APB_VIRT_BASE + 0x19000)
8+
9+ #define BANK_OFF (n ) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))
10+ #define GPIO_REG (x ) (*((volatile u32 *)(GPIO_REGS_VIRT + (x))))
11+
12+ #define NR_BUILTIN_GPIO IRQ_GPIO_NUM
13+
14+ #define gpio_to_bank (gpio ) ((gpio) >> 5)
15+
16+ /* NOTE: these macros are defined here to make optimization of
17+ * gpio_{get,set}_value() to work when 'gpio' is a constant.
18+ * Usage of these macros otherwise is no longer recommended,
19+ * use generic GPIO API whenever possible.
20+ */
21+ #define GPIO_bit (gpio ) (1 << ((gpio) & 0x1f))
22+
23+ #define GPLR (x ) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x00)
24+ #define GPDR (x ) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x0c)
25+ #define GPSR (x ) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x18)
26+ #define GPCR (x ) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x24)
27+
28+ #include <plat/gpio-pxa.h>
29+
30+ #endif /* __ASM_MACH_GPIO_PXA_H */
Original file line number Diff line number Diff line change 11#ifndef __ASM_MACH_GPIO_H
22#define __ASM_MACH_GPIO_H
33
4- #include <mach/addr-map.h>
5- #include <mach/irqs.h>
64#include <asm-generic/gpio.h>
75
8- #define GPIO_REGS_VIRT (APB_VIRT_BASE + 0x19000)
9-
10- #define BANK_OFF (n ) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))
11- #define GPIO_REG (x ) (*((volatile u32 *)(GPIO_REGS_VIRT + (x))))
12-
13- #define NR_BUILTIN_GPIO IRQ_GPIO_NUM
14-
15- #define gpio_to_bank (gpio ) ((gpio) >> 5)
166#define gpio_to_irq (gpio ) (IRQ_GPIO_START + (gpio))
177#define irq_to_gpio (irq ) ((irq) - IRQ_GPIO_START)
188
19-
209#define __gpio_is_inverted (gpio ) (0)
2110#define __gpio_is_occupied (gpio ) (0)
2211
23- /* NOTE: these macros are defined here to make optimization of
24- * gpio_{get,set}_value() to work when 'gpio' is a constant.
25- * Usage of these macros otherwise is no longer recommended,
26- * use generic GPIO API whenever possible.
27- */
28- #define GPIO_bit (gpio ) (1 << ((gpio) & 0x1f))
29-
30- #define GPLR (x ) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x00)
31- #define GPDR (x ) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x0c)
32- #define GPSR (x ) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x18)
33- #define GPCR (x ) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x24)
34-
3512#include <plat/gpio.h>
3613#endif /* __ASM_MACH_GPIO_H */
Original file line number Diff line number Diff line change 1414#include <linux/kernel.h>
1515#include <linux/platform_device.h>
1616#include <linux/io.h>
17- #include <linux/gpio.h>
1817#include <linux/regulator/machine.h>
1918#include <linux/regulator/max8649.h>
2019#include <linux/mfd/max8925.h>
Original file line number Diff line number Diff line change 99 * it under the terms of the GNU General Public License version 2 as
1010 * published by the Free Software Foundation.
1111 */
12- #include <linux/gpio.h>
1312#include <linux/module.h>
1413#include <linux/kernel.h>
1514#include <linux/init.h>
2524#include <mach/irqs.h>
2625#include <mach/dma.h>
2726#include <mach/mfp.h>
27+ #include <mach/gpio-pxa.h>
2828#include <mach/devices.h>
2929#include <mach/mmp2.h>
3030
Original file line number Diff line number Diff line change 77 * it under the terms of the GNU General Public License version 2 as
88 * published by the Free Software Foundation.
99 */
10- #include <linux/gpio.h>
1110#include <linux/module.h>
1211#include <linux/kernel.h>
1312#include <linux/init.h>
2120#include <mach/regs-apbc.h>
2221#include <mach/regs-apmu.h>
2322#include <mach/irqs.h>
23+ #include <mach/gpio-pxa.h>
2424#include <mach/dma.h>
2525#include <mach/devices.h>
2626#include <mach/mfp.h>
Original file line number Diff line number Diff line change 77 * it under the terms of the GNU General Public License version 2 as
88 * published by the Free Software Foundation.
99 */
10- #include <linux/gpio.h>
1110#include <linux/module.h>
1211#include <linux/kernel.h>
1312#include <linux/init.h>
2019#include <mach/regs-apmu.h>
2120#include <mach/cputype.h>
2221#include <mach/irqs.h>
22+ #include <mach/gpio-pxa.h>
2323#include <mach/dma.h>
2424#include <mach/mfp.h>
2525#include <mach/devices.h>
Original file line number Diff line number Diff line change 1212#include <linux/kernel.h>
1313#include <linux/platform_device.h>
1414#include <linux/smc91x.h>
15+ #include <linux/gpio.h>
1516
1617#include <asm/mach-types.h>
1718#include <asm/mach/arch.h>
You can’t perform that action at this time.
0 commit comments