diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-24 17:01:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-24 17:01:46 -0400 |
commit | b1bf7d4d1b3911352cf1ec63c1de06214288ccd0 (patch) | |
tree | 0fd27c638977cb5c7e6e3f95085ce842b57a4ae3 /arch/arm | |
parent | 0708500d49e8439d9fe5529795bdc1485f0f46c3 (diff) | |
parent | 3e11f7b840b4671213c66817294ad7dd0b572756 (diff) |
Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6
Pull GPIO driver changes from Grant Likely:
"Lots of gpio changes, both to core code and drivers.
Changes do touch architecture code to remove the need for separate
arm/gpio.h includes in most architectures.
Some new drivers are added, and a number of gpio drivers are converted
to use irq_domains for gpio inputs used as interrupts. Device tree
support has been amended to allow multiple gpio_chips to use the same
device tree node.
Remaining changes are primarily bug fixes."
* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6: (33 commits)
gpio/generic: initialize basic_mmio_gpio shadow variables properly
gpiolib: Remove 'const' from data argument of gpiochip_find()
gpio/rc5t583: add gpio driver for RICOH PMIC RC5T583
gpiolib: quiet gpiochip_add boot message noise
gpio: mpc8xxx: Prevent NULL pointer deref in demux handler
gpio/lpc32xx: Add device tree support
gpio: Adjust of_xlate API to support multiple GPIO chips
gpiolib: Implement devm_gpio_request_one()
gpio-mcp23s08: dbg_show: fix pullup configuration display
Add support for TCA6424A
gpio/omap: (re)fix wakeups on level-triggered GPIOs
gpio/omap: fix broken context restore for non-OFF mode transitions
gpio/omap: fix missing check in *_runtime_suspend()
gpio/omap: remove cpu_is_omapxxxx() checks from *_runtime_resume()
gpio/omap: remove suspend/resume callbacks
gpio/omap: remove retrigger variable in gpio_irq_handler
gpio/omap: remove saved_wakeup field from struct gpio_bank
gpio/omap: remove suspend_wakeup field from struct gpio_bank
gpio/omap: remove saved_fallingdetect, saved_risingdetect
gpio/omap: remove virtual_irq_start variable
...
Conflicts:
drivers/gpio/gpio-samsung.c
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx35_3ds.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-lpc32xx/include/mach/gpio.h | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap1/gpio15xx.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/gpio16xx.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/gpio7xx.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/gpio.c | 3 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/gpio.h | 3 |
8 files changed, 14 insertions, 19 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 312450941a1a..5458aa9db067 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config ARM | 1 | config ARM |
2 | bool | 2 | bool |
3 | default y | 3 | default y |
4 | select ARCH_HAVE_CUSTOM_GPIO_H | ||
4 | select HAVE_AOUT | 5 | select HAVE_AOUT |
5 | select HAVE_DMA_API_DEBUG | 6 | select HAVE_DMA_API_DEBUG |
6 | select HAVE_IDE if PCI || ISA || PCMCIA | 7 | select HAVE_IDE if PCI || ISA || PCMCIA |
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c index 86284bba46d3..28aa19476de7 100644 --- a/arch/arm/mach-imx/mach-mx35_3ds.c +++ b/arch/arm/mach-imx/mach-mx35_3ds.c | |||
@@ -98,8 +98,7 @@ static struct i2c_board_info __initdata i2c_devices_3ds[] = { | |||
98 | 98 | ||
99 | static int lcd_power_gpio = -ENXIO; | 99 | static int lcd_power_gpio = -ENXIO; |
100 | 100 | ||
101 | static int mc9s08dz60_gpiochip_match(struct gpio_chip *chip, | 101 | static int mc9s08dz60_gpiochip_match(struct gpio_chip *chip, void *data) |
102 | const void *data) | ||
103 | { | 102 | { |
104 | return !strcmp(chip->label, data); | 103 | return !strcmp(chip->label, data); |
105 | } | 104 | } |
diff --git a/arch/arm/mach-lpc32xx/include/mach/gpio.h b/arch/arm/mach-lpc32xx/include/mach/gpio.h index 40a8c178f10d..2ba6ca412bef 100644 --- a/arch/arm/mach-lpc32xx/include/mach/gpio.h +++ b/arch/arm/mach-lpc32xx/include/mach/gpio.h | |||
@@ -1 +1,8 @@ | |||
1 | /* empty */ | 1 | #ifndef __MACH_GPIO_H |
2 | #define __MACH_GPIO_H | ||
3 | |||
4 | #include "gpio-lpc32xx.h" | ||
5 | |||
6 | #define ARCH_NR_GPIOS (LPC32XX_GPO_P3_GRP + LPC32XX_GPO_P3_MAX) | ||
7 | |||
8 | #endif /* __MACH_GPIO_H */ | ||
diff --git a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c index 634903ef8292..ebef15e5e7b7 100644 --- a/arch/arm/mach-omap1/gpio15xx.c +++ b/arch/arm/mach-omap1/gpio15xx.c | |||
@@ -46,7 +46,6 @@ static struct omap_gpio_reg_offs omap15xx_mpuio_regs = { | |||
46 | }; | 46 | }; |
47 | 47 | ||
48 | static struct __initdata omap_gpio_platform_data omap15xx_mpu_gpio_config = { | 48 | static struct __initdata omap_gpio_platform_data omap15xx_mpu_gpio_config = { |
49 | .virtual_irq_start = IH_MPUIO_BASE, | ||
50 | .is_mpuio = true, | 49 | .is_mpuio = true, |
51 | .bank_width = 16, | 50 | .bank_width = 16, |
52 | .bank_stride = 1, | 51 | .bank_stride = 1, |
@@ -89,7 +88,6 @@ static struct omap_gpio_reg_offs omap15xx_gpio_regs = { | |||
89 | }; | 88 | }; |
90 | 89 | ||
91 | static struct __initdata omap_gpio_platform_data omap15xx_gpio_config = { | 90 | static struct __initdata omap_gpio_platform_data omap15xx_gpio_config = { |
92 | .virtual_irq_start = IH_GPIO_BASE, | ||
93 | .bank_width = 16, | 91 | .bank_width = 16, |
94 | .regs = &omap15xx_gpio_regs, | 92 | .regs = &omap15xx_gpio_regs, |
95 | }; | 93 | }; |
diff --git a/arch/arm/mach-omap1/gpio16xx.c b/arch/arm/mach-omap1/gpio16xx.c index 1fb3b9ad496e..2a48cd2e1754 100644 --- a/arch/arm/mach-omap1/gpio16xx.c +++ b/arch/arm/mach-omap1/gpio16xx.c | |||
@@ -52,7 +52,6 @@ static struct omap_gpio_reg_offs omap16xx_mpuio_regs = { | |||
52 | }; | 52 | }; |
53 | 53 | ||
54 | static struct __initdata omap_gpio_platform_data omap16xx_mpu_gpio_config = { | 54 | static struct __initdata omap_gpio_platform_data omap16xx_mpu_gpio_config = { |
55 | .virtual_irq_start = IH_MPUIO_BASE, | ||
56 | .is_mpuio = true, | 55 | .is_mpuio = true, |
57 | .bank_width = 16, | 56 | .bank_width = 16, |
58 | .bank_stride = 1, | 57 | .bank_stride = 1, |
@@ -99,7 +98,6 @@ static struct omap_gpio_reg_offs omap16xx_gpio_regs = { | |||
99 | }; | 98 | }; |
100 | 99 | ||
101 | static struct __initdata omap_gpio_platform_data omap16xx_gpio1_config = { | 100 | static struct __initdata omap_gpio_platform_data omap16xx_gpio1_config = { |
102 | .virtual_irq_start = IH_GPIO_BASE, | ||
103 | .bank_width = 16, | 101 | .bank_width = 16, |
104 | .regs = &omap16xx_gpio_regs, | 102 | .regs = &omap16xx_gpio_regs, |
105 | }; | 103 | }; |
@@ -128,7 +126,6 @@ static struct __initdata resource omap16xx_gpio2_resources[] = { | |||
128 | }; | 126 | }; |
129 | 127 | ||
130 | static struct __initdata omap_gpio_platform_data omap16xx_gpio2_config = { | 128 | static struct __initdata omap_gpio_platform_data omap16xx_gpio2_config = { |
131 | .virtual_irq_start = IH_GPIO_BASE + 16, | ||
132 | .bank_width = 16, | 129 | .bank_width = 16, |
133 | .regs = &omap16xx_gpio_regs, | 130 | .regs = &omap16xx_gpio_regs, |
134 | }; | 131 | }; |
@@ -157,7 +154,6 @@ static struct __initdata resource omap16xx_gpio3_resources[] = { | |||
157 | }; | 154 | }; |
158 | 155 | ||
159 | static struct __initdata omap_gpio_platform_data omap16xx_gpio3_config = { | 156 | static struct __initdata omap_gpio_platform_data omap16xx_gpio3_config = { |
160 | .virtual_irq_start = IH_GPIO_BASE + 32, | ||
161 | .bank_width = 16, | 157 | .bank_width = 16, |
162 | .regs = &omap16xx_gpio_regs, | 158 | .regs = &omap16xx_gpio_regs, |
163 | }; | 159 | }; |
@@ -186,7 +182,6 @@ static struct __initdata resource omap16xx_gpio4_resources[] = { | |||
186 | }; | 182 | }; |
187 | 183 | ||
188 | static struct __initdata omap_gpio_platform_data omap16xx_gpio4_config = { | 184 | static struct __initdata omap_gpio_platform_data omap16xx_gpio4_config = { |
189 | .virtual_irq_start = IH_GPIO_BASE + 48, | ||
190 | .bank_width = 16, | 185 | .bank_width = 16, |
191 | .regs = &omap16xx_gpio_regs, | 186 | .regs = &omap16xx_gpio_regs, |
192 | }; | 187 | }; |
diff --git a/arch/arm/mach-omap1/gpio7xx.c b/arch/arm/mach-omap1/gpio7xx.c index 4771d6b68b96..acf12b73eace 100644 --- a/arch/arm/mach-omap1/gpio7xx.c +++ b/arch/arm/mach-omap1/gpio7xx.c | |||
@@ -51,7 +51,6 @@ static struct omap_gpio_reg_offs omap7xx_mpuio_regs = { | |||
51 | }; | 51 | }; |
52 | 52 | ||
53 | static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = { | 53 | static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = { |
54 | .virtual_irq_start = IH_MPUIO_BASE, | ||
55 | .is_mpuio = true, | 54 | .is_mpuio = true, |
56 | .bank_width = 16, | 55 | .bank_width = 16, |
57 | .bank_stride = 2, | 56 | .bank_stride = 2, |
@@ -93,7 +92,6 @@ static struct omap_gpio_reg_offs omap7xx_gpio_regs = { | |||
93 | }; | 92 | }; |
94 | 93 | ||
95 | static struct __initdata omap_gpio_platform_data omap7xx_gpio1_config = { | 94 | static struct __initdata omap_gpio_platform_data omap7xx_gpio1_config = { |
96 | .virtual_irq_start = IH_GPIO_BASE, | ||
97 | .bank_width = 32, | 95 | .bank_width = 32, |
98 | .regs = &omap7xx_gpio_regs, | 96 | .regs = &omap7xx_gpio_regs, |
99 | }; | 97 | }; |
@@ -122,7 +120,6 @@ static struct __initdata resource omap7xx_gpio2_resources[] = { | |||
122 | }; | 120 | }; |
123 | 121 | ||
124 | static struct __initdata omap_gpio_platform_data omap7xx_gpio2_config = { | 122 | static struct __initdata omap_gpio_platform_data omap7xx_gpio2_config = { |
125 | .virtual_irq_start = IH_GPIO_BASE + 32, | ||
126 | .bank_width = 32, | 123 | .bank_width = 32, |
127 | .regs = &omap7xx_gpio_regs, | 124 | .regs = &omap7xx_gpio_regs, |
128 | }; | 125 | }; |
@@ -151,7 +148,6 @@ static struct __initdata resource omap7xx_gpio3_resources[] = { | |||
151 | }; | 148 | }; |
152 | 149 | ||
153 | static struct __initdata omap_gpio_platform_data omap7xx_gpio3_config = { | 150 | static struct __initdata omap_gpio_platform_data omap7xx_gpio3_config = { |
154 | .virtual_irq_start = IH_GPIO_BASE + 64, | ||
155 | .bank_width = 32, | 151 | .bank_width = 32, |
156 | .regs = &omap7xx_gpio_regs, | 152 | .regs = &omap7xx_gpio_regs, |
157 | }; | 153 | }; |
@@ -180,7 +176,6 @@ static struct __initdata resource omap7xx_gpio4_resources[] = { | |||
180 | }; | 176 | }; |
181 | 177 | ||
182 | static struct __initdata omap_gpio_platform_data omap7xx_gpio4_config = { | 178 | static struct __initdata omap_gpio_platform_data omap7xx_gpio4_config = { |
183 | .virtual_irq_start = IH_GPIO_BASE + 96, | ||
184 | .bank_width = 32, | 179 | .bank_width = 32, |
185 | .regs = &omap7xx_gpio_regs, | 180 | .regs = &omap7xx_gpio_regs, |
186 | }; | 181 | }; |
@@ -209,7 +204,6 @@ static struct __initdata resource omap7xx_gpio5_resources[] = { | |||
209 | }; | 204 | }; |
210 | 205 | ||
211 | static struct __initdata omap_gpio_platform_data omap7xx_gpio5_config = { | 206 | static struct __initdata omap_gpio_platform_data omap7xx_gpio5_config = { |
212 | .virtual_irq_start = IH_GPIO_BASE + 128, | ||
213 | .bank_width = 32, | 207 | .bank_width = 32, |
214 | .regs = &omap7xx_gpio_regs, | 208 | .regs = &omap7xx_gpio_regs, |
215 | }; | 209 | }; |
@@ -238,7 +232,6 @@ static struct __initdata resource omap7xx_gpio6_resources[] = { | |||
238 | }; | 232 | }; |
239 | 233 | ||
240 | static struct __initdata omap_gpio_platform_data omap7xx_gpio6_config = { | 234 | static struct __initdata omap_gpio_platform_data omap7xx_gpio6_config = { |
241 | .virtual_irq_start = IH_GPIO_BASE + 160, | ||
242 | .bank_width = 32, | 235 | .bank_width = 32, |
243 | .regs = &omap7xx_gpio_regs, | 236 | .regs = &omap7xx_gpio_regs, |
244 | }; | 237 | }; |
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c index a80e093b039f..9ad7d489b0de 100644 --- a/arch/arm/mach-omap2/gpio.c +++ b/arch/arm/mach-omap2/gpio.c | |||
@@ -56,7 +56,6 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
56 | dev_attr = (struct omap_gpio_dev_attr *)oh->dev_attr; | 56 | dev_attr = (struct omap_gpio_dev_attr *)oh->dev_attr; |
57 | pdata->bank_width = dev_attr->bank_width; | 57 | pdata->bank_width = dev_attr->bank_width; |
58 | pdata->dbck_flag = dev_attr->dbck_flag; | 58 | pdata->dbck_flag = dev_attr->dbck_flag; |
59 | pdata->virtual_irq_start = IH_GPIO_BASE + 32 * (id - 1); | ||
60 | pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count; | 59 | pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count; |
61 | pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL); | 60 | pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL); |
62 | if (!pdata->regs) { | 61 | if (!pdata->regs) { |
@@ -103,6 +102,8 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
103 | pdata->regs->dataout = OMAP4_GPIO_DATAOUT; | 102 | pdata->regs->dataout = OMAP4_GPIO_DATAOUT; |
104 | pdata->regs->set_dataout = OMAP4_GPIO_SETDATAOUT; | 103 | pdata->regs->set_dataout = OMAP4_GPIO_SETDATAOUT; |
105 | pdata->regs->clr_dataout = OMAP4_GPIO_CLEARDATAOUT; | 104 | pdata->regs->clr_dataout = OMAP4_GPIO_CLEARDATAOUT; |
105 | pdata->regs->irqstatus_raw0 = OMAP4_GPIO_IRQSTATUSRAW0; | ||
106 | pdata->regs->irqstatus_raw1 = OMAP4_GPIO_IRQSTATUSRAW1; | ||
106 | pdata->regs->irqstatus = OMAP4_GPIO_IRQSTATUS0; | 107 | pdata->regs->irqstatus = OMAP4_GPIO_IRQSTATUS0; |
107 | pdata->regs->irqstatus2 = OMAP4_GPIO_IRQSTATUS1; | 108 | pdata->regs->irqstatus2 = OMAP4_GPIO_IRQSTATUS1; |
108 | pdata->regs->irqenable = OMAP4_GPIO_IRQSTATUSSET0; | 109 | pdata->regs->irqenable = OMAP4_GPIO_IRQSTATUSSET0; |
diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h index 2f6e9924a814..50fb7cc000ea 100644 --- a/arch/arm/plat-omap/include/plat/gpio.h +++ b/arch/arm/plat-omap/include/plat/gpio.h | |||
@@ -172,6 +172,8 @@ struct omap_gpio_reg_offs { | |||
172 | u16 clr_dataout; | 172 | u16 clr_dataout; |
173 | u16 irqstatus; | 173 | u16 irqstatus; |
174 | u16 irqstatus2; | 174 | u16 irqstatus2; |
175 | u16 irqstatus_raw0; | ||
176 | u16 irqstatus_raw1; | ||
175 | u16 irqenable; | 177 | u16 irqenable; |
176 | u16 irqenable2; | 178 | u16 irqenable2; |
177 | u16 set_irqenable; | 179 | u16 set_irqenable; |
@@ -193,7 +195,6 @@ struct omap_gpio_reg_offs { | |||
193 | }; | 195 | }; |
194 | 196 | ||
195 | struct omap_gpio_platform_data { | 197 | struct omap_gpio_platform_data { |
196 | u16 virtual_irq_start; | ||
197 | int bank_type; | 198 | int bank_type; |
198 | int bank_width; /* GPIO bank width */ | 199 | int bank_width; /* GPIO bank width */ |
199 | int bank_stride; /* Only needed for omap1 MPUIO */ | 200 | int bank_stride; /* Only needed for omap1 MPUIO */ |