aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-pxa/gpio.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2010-11-29 05:18:26 -0500
committerLennert Buytenhek <buytenh@wantstofly.org>2011-01-13 11:18:56 -0500
commita3f4c927d379cfaa597bc8ff75dc9d28f8d9200e (patch)
tree39521557543e91134b5a7e190bdf7b7ac2787e04 /arch/arm/plat-pxa/gpio.c
parent406b005045ad18ffa08c439545801e1c8cec4b5e (diff)
ARM: PXA SoCs: irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Diffstat (limited to 'arch/arm/plat-pxa/gpio.c')
-rw-r--r--arch/arm/plat-pxa/gpio.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c
index 98548c6903a0..e7de6ae2a1e8 100644
--- a/arch/arm/plat-pxa/gpio.c
+++ b/arch/arm/plat-pxa/gpio.c
@@ -155,10 +155,10 @@ static inline void update_edge_detect(struct pxa_gpio_chip *c)
155 __raw_writel(gfer, c->regbase + GFER_OFFSET); 155 __raw_writel(gfer, c->regbase + GFER_OFFSET);
156} 156}
157 157
158static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) 158static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type)
159{ 159{
160 struct pxa_gpio_chip *c; 160 struct pxa_gpio_chip *c;
161 int gpio = irq_to_gpio(irq); 161 int gpio = irq_to_gpio(d->irq);
162 unsigned long gpdr, mask = GPIO_bit(gpio); 162 unsigned long gpdr, mask = GPIO_bit(gpio);
163 163
164 c = gpio_to_chip(gpio); 164 c = gpio_to_chip(gpio);
@@ -195,7 +195,7 @@ static int pxa_gpio_irq_type(unsigned int irq, unsigned int type)
195 195
196 update_edge_detect(c); 196 update_edge_detect(c);
197 197
198 pr_debug("%s: IRQ%d (GPIO%d) - edge%s%s\n", __func__, irq, gpio, 198 pr_debug("%s: IRQ%d (GPIO%d) - edge%s%s\n", __func__, d->irq, gpio,
199 ((type & IRQ_TYPE_EDGE_RISING) ? " rising" : ""), 199 ((type & IRQ_TYPE_EDGE_RISING) ? " rising" : ""),
200 ((type & IRQ_TYPE_EDGE_FALLING) ? " falling" : "")); 200 ((type & IRQ_TYPE_EDGE_FALLING) ? " falling" : ""));
201 return 0; 201 return 0;
@@ -227,17 +227,17 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
227 } while (loop); 227 } while (loop);
228} 228}
229 229
230static void pxa_ack_muxed_gpio(unsigned int irq) 230static void pxa_ack_muxed_gpio(struct irq_data *d)
231{ 231{
232 int gpio = irq_to_gpio(irq); 232 int gpio = irq_to_gpio(d->irq);
233 struct pxa_gpio_chip *c = gpio_to_chip(gpio); 233 struct pxa_gpio_chip *c = gpio_to_chip(gpio);
234 234
235 __raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET); 235 __raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET);
236} 236}
237 237
238static void pxa_mask_muxed_gpio(unsigned int irq) 238static void pxa_mask_muxed_gpio(struct irq_data *d)
239{ 239{
240 int gpio = irq_to_gpio(irq); 240 int gpio = irq_to_gpio(d->irq);
241 struct pxa_gpio_chip *c = gpio_to_chip(gpio); 241 struct pxa_gpio_chip *c = gpio_to_chip(gpio);
242 uint32_t grer, gfer; 242 uint32_t grer, gfer;
243 243
@@ -249,9 +249,9 @@ static void pxa_mask_muxed_gpio(unsigned int irq)
249 __raw_writel(gfer, c->regbase + GFER_OFFSET); 249 __raw_writel(gfer, c->regbase + GFER_OFFSET);
250} 250}
251 251
252static void pxa_unmask_muxed_gpio(unsigned int irq) 252static void pxa_unmask_muxed_gpio(struct irq_data *d)
253{ 253{
254 int gpio = irq_to_gpio(irq); 254 int gpio = irq_to_gpio(d->irq);
255 struct pxa_gpio_chip *c = gpio_to_chip(gpio); 255 struct pxa_gpio_chip *c = gpio_to_chip(gpio);
256 256
257 c->irq_mask |= GPIO_bit(gpio); 257 c->irq_mask |= GPIO_bit(gpio);
@@ -260,10 +260,10 @@ static void pxa_unmask_muxed_gpio(unsigned int irq)
260 260
261static struct irq_chip pxa_muxed_gpio_chip = { 261static struct irq_chip pxa_muxed_gpio_chip = {
262 .name = "GPIO", 262 .name = "GPIO",
263 .ack = pxa_ack_muxed_gpio, 263 .irq_ack = pxa_ack_muxed_gpio,
264 .mask = pxa_mask_muxed_gpio, 264 .irq_mask = pxa_mask_muxed_gpio,
265 .unmask = pxa_unmask_muxed_gpio, 265 .irq_unmask = pxa_unmask_muxed_gpio,
266 .set_type = pxa_gpio_irq_type, 266 .irq_set_type = pxa_gpio_irq_type,
267}; 267};
268 268
269void __init pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn) 269void __init pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn)
@@ -291,7 +291,7 @@ void __init pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn)
291 291
292 /* Install handler for GPIO>=2 edge detect interrupts */ 292 /* Install handler for GPIO>=2 edge detect interrupts */
293 set_irq_chained_handler(mux_irq, pxa_gpio_demux_handler); 293 set_irq_chained_handler(mux_irq, pxa_gpio_demux_handler);
294 pxa_muxed_gpio_chip.set_wake = fn; 294 pxa_muxed_gpio_chip.irq_set_wake = fn;
295} 295}
296 296
297#ifdef CONFIG_PM 297#ifdef CONFIG_PM