diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-14 16:25:23 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-14 16:25:23 -0500 |
| commit | f5e4e20faa1eee3feaa0394897bbd1aca544e809 (patch) | |
| tree | 047a93ff025c46ed97d3192a79f55b38fa071ca1 | |
| parent | 4964e0664c80680fa6b28ef91381c076a5b25c2c (diff) | |
| parent | f408c985cefc9b1d99bc099e1208dd7df3445aa5 (diff) | |
Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6
2nd round of GPIO changes for v3.3 merge window
* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6:
GPIO: sa1100: implement proper gpiolib gpio_to_irq conversion
gpio: pl061: remove combined interrupt
gpio: pl061: convert to use generic irq chip
GPIO: add bindings for managed devices
ARM: realview: convert pl061 no irq to 0 instead of -1
gpio: pl061: convert to use 0 for no irq
gpio: pl061: use chained_irq_* functions in irq handler
GPIO/pl061: Add suspend resume capability
drivers/gpio/gpio-tegra.c: use devm_request_and_ioremap
| -rw-r--r-- | arch/arm/mach-realview/realview_eb.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-realview/realview_pb1176.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-realview/realview_pb11mp.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-realview/realview_pba8.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-realview/realview_pbx.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-sa1100/include/mach/gpio.h | 3 | ||||
| -rw-r--r-- | drivers/gpio/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/gpio/Makefile | 2 | ||||
| -rw-r--r-- | drivers/gpio/devres.c | 90 | ||||
| -rw-r--r-- | drivers/gpio/gpio-pl061.c | 200 | ||||
| -rw-r--r-- | drivers/gpio/gpio-sa1100.c | 6 | ||||
| -rw-r--r-- | drivers/gpio/gpio-tegra.c | 9 | ||||
| -rw-r--r-- | include/asm-generic/gpio.h | 4 | ||||
| -rw-r--r-- | include/linux/amba/pl061.h | 2 |
14 files changed, 214 insertions, 118 deletions
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 0069561464f9..e62962117763 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
| @@ -117,17 +117,14 @@ static void __init realview_eb_map_io(void) | |||
| 117 | 117 | ||
| 118 | static struct pl061_platform_data gpio0_plat_data = { | 118 | static struct pl061_platform_data gpio0_plat_data = { |
| 119 | .gpio_base = 0, | 119 | .gpio_base = 0, |
| 120 | .irq_base = -1, | ||
| 121 | }; | 120 | }; |
| 122 | 121 | ||
| 123 | static struct pl061_platform_data gpio1_plat_data = { | 122 | static struct pl061_platform_data gpio1_plat_data = { |
| 124 | .gpio_base = 8, | 123 | .gpio_base = 8, |
| 125 | .irq_base = -1, | ||
| 126 | }; | 124 | }; |
| 127 | 125 | ||
| 128 | static struct pl061_platform_data gpio2_plat_data = { | 126 | static struct pl061_platform_data gpio2_plat_data = { |
| 129 | .gpio_base = 16, | 127 | .gpio_base = 16, |
| 130 | .irq_base = -1, | ||
| 131 | }; | 128 | }; |
| 132 | 129 | ||
| 133 | static struct pl022_ssp_controller ssp0_plat_data = { | 130 | static struct pl022_ssp_controller ssp0_plat_data = { |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index 8fe395568a47..e4abe94fb11a 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
| @@ -113,17 +113,14 @@ static void __init realview_pb1176_map_io(void) | |||
| 113 | 113 | ||
| 114 | static struct pl061_platform_data gpio0_plat_data = { | 114 | static struct pl061_platform_data gpio0_plat_data = { |
| 115 | .gpio_base = 0, | 115 | .gpio_base = 0, |
| 116 | .irq_base = -1, | ||
| 117 | }; | 116 | }; |
| 118 | 117 | ||
| 119 | static struct pl061_platform_data gpio1_plat_data = { | 118 | static struct pl061_platform_data gpio1_plat_data = { |
| 120 | .gpio_base = 8, | 119 | .gpio_base = 8, |
| 121 | .irq_base = -1, | ||
| 122 | }; | 120 | }; |
| 123 | 121 | ||
| 124 | static struct pl061_platform_data gpio2_plat_data = { | 122 | static struct pl061_platform_data gpio2_plat_data = { |
| 125 | .gpio_base = 16, | 123 | .gpio_base = 16, |
| 126 | .irq_base = -1, | ||
| 127 | }; | 124 | }; |
| 128 | 125 | ||
| 129 | static struct pl022_ssp_controller ssp0_plat_data = { | 126 | static struct pl022_ssp_controller ssp0_plat_data = { |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index 34a26011bb89..127a3fd42ab1 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
| @@ -112,17 +112,14 @@ static void __init realview_pb11mp_map_io(void) | |||
| 112 | 112 | ||
| 113 | static struct pl061_platform_data gpio0_plat_data = { | 113 | static struct pl061_platform_data gpio0_plat_data = { |
| 114 | .gpio_base = 0, | 114 | .gpio_base = 0, |
| 115 | .irq_base = -1, | ||
| 116 | }; | 115 | }; |
| 117 | 116 | ||
| 118 | static struct pl061_platform_data gpio1_plat_data = { | 117 | static struct pl061_platform_data gpio1_plat_data = { |
| 119 | .gpio_base = 8, | 118 | .gpio_base = 8, |
| 120 | .irq_base = -1, | ||
| 121 | }; | 119 | }; |
| 122 | 120 | ||
| 123 | static struct pl061_platform_data gpio2_plat_data = { | 121 | static struct pl061_platform_data gpio2_plat_data = { |
| 124 | .gpio_base = 16, | 122 | .gpio_base = 16, |
| 125 | .irq_base = -1, | ||
| 126 | }; | 123 | }; |
| 127 | 124 | ||
| 128 | static struct pl022_ssp_controller ssp0_plat_data = { | 125 | static struct pl022_ssp_controller ssp0_plat_data = { |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index d26a6def1d65..25b2e59296f8 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
| @@ -102,17 +102,14 @@ static void __init realview_pba8_map_io(void) | |||
| 102 | 102 | ||
| 103 | static struct pl061_platform_data gpio0_plat_data = { | 103 | static struct pl061_platform_data gpio0_plat_data = { |
| 104 | .gpio_base = 0, | 104 | .gpio_base = 0, |
| 105 | .irq_base = -1, | ||
| 106 | }; | 105 | }; |
| 107 | 106 | ||
| 108 | static struct pl061_platform_data gpio1_plat_data = { | 107 | static struct pl061_platform_data gpio1_plat_data = { |
| 109 | .gpio_base = 8, | 108 | .gpio_base = 8, |
| 110 | .irq_base = -1, | ||
| 111 | }; | 109 | }; |
| 112 | 110 | ||
| 113 | static struct pl061_platform_data gpio2_plat_data = { | 111 | static struct pl061_platform_data gpio2_plat_data = { |
| 114 | .gpio_base = 16, | 112 | .gpio_base = 16, |
| 115 | .irq_base = -1, | ||
| 116 | }; | 113 | }; |
| 117 | 114 | ||
| 118 | static struct pl022_ssp_controller ssp0_plat_data = { | 115 | static struct pl022_ssp_controller ssp0_plat_data = { |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index a250fb4124bf..ac715645b860 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
| @@ -124,17 +124,14 @@ static void __init realview_pbx_map_io(void) | |||
| 124 | 124 | ||
| 125 | static struct pl061_platform_data gpio0_plat_data = { | 125 | static struct pl061_platform_data gpio0_plat_data = { |
| 126 | .gpio_base = 0, | 126 | .gpio_base = 0, |
| 127 | .irq_base = -1, | ||
| 128 | }; | 127 | }; |
| 129 | 128 | ||
| 130 | static struct pl061_platform_data gpio1_plat_data = { | 129 | static struct pl061_platform_data gpio1_plat_data = { |
| 131 | .gpio_base = 8, | 130 | .gpio_base = 8, |
| 132 | .irq_base = -1, | ||
| 133 | }; | 131 | }; |
| 134 | 132 | ||
| 135 | static struct pl061_platform_data gpio2_plat_data = { | 133 | static struct pl061_platform_data gpio2_plat_data = { |
| 136 | .gpio_base = 16, | 134 | .gpio_base = 16, |
| 137 | .irq_base = -1, | ||
| 138 | }; | 135 | }; |
| 139 | 136 | ||
| 140 | static struct pl022_ssp_controller ssp0_plat_data = { | 137 | static struct pl022_ssp_controller ssp0_plat_data = { |
diff --git a/arch/arm/mach-sa1100/include/mach/gpio.h b/arch/arm/mach-sa1100/include/mach/gpio.h index 703631887c94..a38fc4f54241 100644 --- a/arch/arm/mach-sa1100/include/mach/gpio.h +++ b/arch/arm/mach-sa1100/include/mach/gpio.h | |||
| @@ -51,7 +51,4 @@ static inline void gpio_set_value(unsigned gpio, int value) | |||
| 51 | 51 | ||
| 52 | #define gpio_cansleep __gpio_cansleep | 52 | #define gpio_cansleep __gpio_cansleep |
| 53 | 53 | ||
| 54 | #define gpio_to_irq(gpio) ((gpio < 11) ? (IRQ_GPIO0 + gpio) : \ | ||
| 55 | (IRQ_GPIO11 - 11 + gpio)) | ||
| 56 | |||
| 57 | #endif | 54 | #endif |
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 573532f7553e..37c4bd1cacd5 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig | |||
| @@ -138,6 +138,7 @@ config GPIO_MXS | |||
| 138 | config GPIO_PL061 | 138 | config GPIO_PL061 |
| 139 | bool "PrimeCell PL061 GPIO support" | 139 | bool "PrimeCell PL061 GPIO support" |
| 140 | depends on ARM_AMBA | 140 | depends on ARM_AMBA |
| 141 | select GENERIC_IRQ_CHIP | ||
| 141 | help | 142 | help |
| 142 | Say yes here to support the PrimeCell PL061 GPIO device | 143 | Say yes here to support the PrimeCell PL061 GPIO device |
| 143 | 144 | ||
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 62e641e79e8f..fa10df604c01 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | ccflags-$(CONFIG_DEBUG_GPIO) += -DDEBUG | 3 | ccflags-$(CONFIG_DEBUG_GPIO) += -DDEBUG |
| 4 | 4 | ||
| 5 | obj-$(CONFIG_GPIOLIB) += gpiolib.o | 5 | obj-$(CONFIG_GPIOLIB) += gpiolib.o devres.o |
| 6 | 6 | ||
