diff options
Diffstat (limited to 'arch/arm/plat-stmp3xxx/pinmux.c')
-rw-r--r-- | arch/arm/plat-stmp3xxx/pinmux.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/arm/plat-stmp3xxx/pinmux.c b/arch/arm/plat-stmp3xxx/pinmux.c index 6d6b1a468eda..66d5bac3ace2 100644 --- a/arch/arm/plat-stmp3xxx/pinmux.c +++ b/arch/arm/plat-stmp3xxx/pinmux.c | |||
@@ -351,27 +351,27 @@ void stmp3xxx_release_pin_group(struct pin_group *pin_group, const char *label) | |||
351 | } | 351 | } |
352 | EXPORT_SYMBOL(stmp3xxx_release_pin_group); | 352 | EXPORT_SYMBOL(stmp3xxx_release_pin_group); |
353 | 353 | ||
354 | static int stmp3xxx_irq_to_gpio(int irq, | 354 | static int stmp3xxx_irq_data_to_gpio(struct irq_data *d, |
355 | struct stmp3xxx_pinmux_bank **bank, unsigned *gpio) | 355 | struct stmp3xxx_pinmux_bank **bank, unsigned *gpio) |
356 | { | 356 | { |
357 | struct stmp3xxx_pinmux_bank *pm; | 357 | struct stmp3xxx_pinmux_bank *pm; |
358 | 358 | ||
359 | for (pm = pinmux_banks; pm < pinmux_banks + NR_BANKS; pm++) | 359 | for (pm = pinmux_banks; pm < pinmux_banks + NR_BANKS; pm++) |
360 | if (pm->virq <= irq && irq < pm->virq + 32) { | 360 | if (pm->virq <= d->irq && d->irq < pm->virq + 32) { |
361 | *bank = pm; | 361 | *bank = pm; |
362 | *gpio = irq - pm->virq; | 362 | *gpio = d->irq - pm->virq; |
363 | return 0; | 363 | return 0; |
364 | } | 364 | } |
365 | return -ENOENT; | 365 | return -ENOENT; |
366 | } | 366 | } |
367 | 367 | ||
368 | static int stmp3xxx_set_irqtype(unsigned irq, unsigned type) | 368 | static int stmp3xxx_set_irqtype(struct irq_data *d, unsigned type) |
369 | { | 369 | { |
370 | struct stmp3xxx_pinmux_bank *pm; | 370 | struct stmp3xxx_pinmux_bank *pm; |
371 | unsigned gpio; | 371 | unsigned gpio; |
372 | int l, p; | 372 | int l, p; |
373 | 373 | ||
374 | stmp3xxx_irq_to_gpio(irq, &pm, &gpio); | 374 | stmp3xxx_irq_data_to_gpio(d, &pm, &gpio); |
375 | switch (type) { | 375 | switch (type) { |
376 | case IRQ_TYPE_EDGE_RISING: | 376 | case IRQ_TYPE_EDGE_RISING: |
377 | l = 0; p = 1; break; | 377 | l = 0; p = 1; break; |
@@ -398,33 +398,33 @@ static int stmp3xxx_set_irqtype(unsigned irq, unsigned type) | |||
398 | return 0; | 398 | return 0; |
399 | } | 399 | } |
400 | 400 | ||
401 | static void stmp3xxx_pin_ack_irq(unsigned irq) | 401 | static void stmp3xxx_pin_ack_irq(struct irq_data *d) |
402 | { | 402 | { |
403 | u32 stat; | 403 | u32 stat; |
404 | struct stmp3xxx_pinmux_bank *pm; | 404 | struct stmp3xxx_pinmux_bank *pm; |
405 | unsigned gpio; | 405 | unsigned gpio; |
406 | 406 | ||
407 | stmp3xxx_irq_to_gpio(irq, &pm, &gpio); | 407 | stmp3xxx_irq_data_to_gpio(d, &pm, &gpio); |
408 | stat = __raw_readl(pm->irqstat) & (1 << gpio); | 408 | stat = __raw_readl(pm->irqstat) & (1 << gpio); |
409 | stmp3xxx_clearl(stat, pm->irqstat); | 409 | stmp3xxx_clearl(stat, pm->irqstat); |
410 | } | 410 | } |
411 | 411 | ||
412 | static void stmp3xxx_pin_mask_irq(unsigned irq) | 412 | static void stmp3xxx_pin_mask_irq(struct irq_data *d) |
413 | { | 413 | { |
414 | struct stmp3xxx_pinmux_bank *pm; | 414 | struct stmp3xxx_pinmux_bank *pm; |
415 | unsigned gpio; | 415 | unsigned gpio; |
416 | 416 | ||
417 | stmp3xxx_irq_to_gpio(irq, &pm, &gpio); | 417 | stmp3xxx_irq_data_to_gpio(d, &pm, &gpio); |
418 | stmp3xxx_clearl(1 << gpio, pm->irqen); | 418 | stmp3xxx_clearl(1 << gpio, pm->irqen); |
419 | stmp3xxx_clearl(1 << gpio, pm->pin2irq); | 419 | stmp3xxx_clearl(1 << gpio, pm->pin2irq); |
420 | } | 420 | } |
421 | 421 | ||
422 | static void stmp3xxx_pin_unmask_irq(unsigned irq) | 422 | static void stmp3xxx_pin_unmask_irq(struct irq_data *d) |
423 | { | 423 | { |
424 | struct stmp3xxx_pinmux_bank *pm; | 424 | struct stmp3xxx_pinmux_bank *pm; |
425 | unsigned gpio; | 425 | unsigned gpio; |
426 | 426 | ||
427 | stmp3xxx_irq_to_gpio(irq, &pm, &gpio); | 427 | stmp3xxx_irq_data_to_gpio(d, &pm, &gpio); |
428 | stmp3xxx_setl(1 << gpio, pm->irqen); | 428 | stmp3xxx_setl(1 << gpio, pm->irqen); |
429 | stmp3xxx_setl(1 << gpio, pm->pin2irq); | 429 | stmp3xxx_setl(1 << gpio, pm->pin2irq); |
430 | } | 430 | } |
@@ -503,10 +503,10 @@ static void stmp3xxx_gpio_irq(u32 irq, struct irq_desc *desc) | |||
503 | } | 503 | } |
504 | 504 | ||
505 | static struct irq_chip gpio_irq_chip = { | 505 | static struct irq_chip gpio_irq_chip = { |
506 | .ack = stmp3xxx_pin_ack_irq, | 506 | .irq_ack = stmp3xxx_pin_ack_irq, |
507 | .mask = stmp3xxx_pin_mask_irq, | 507 | .irq_mask = stmp3xxx_pin_mask_irq, |
508 | .unmask = stmp3xxx_pin_unmask_irq, | 508 | .irq_unmask = stmp3xxx_pin_unmask_irq, |
509 | .set_type = stmp3xxx_set_irqtype, | 509 | .irq_set_type = stmp3xxx_set_irqtype, |
510 | }; | 510 | }; |
511 | 511 | ||
512 | int __init stmp3xxx_pinmux_init(int virtual_irq_start) | 512 | int __init stmp3xxx_pinmux_init(int virtual_irq_start) |
@@ -533,7 +533,7 @@ int __init stmp3xxx_pinmux_init(int virtual_irq_start) | |||
533 | pm->virq = virtual_irq_start + b * 32; | 533 | pm->virq = virtual_irq_start + b * 32; |
534 | 534 | ||
535 | for (virq = pm->virq; virq < pm->virq; virq++) { | 535 | for (virq = pm->virq; virq < pm->virq; virq++) { |
536 | gpio_irq_chip.mask(virq); | 536 | gpio_irq_chip.irq_mask(irq_get_irq_data(virq)); |
537 | set_irq_chip(virq, &gpio_irq_chip); | 537 | set_irq_chip(virq, &gpio_irq_chip); |
538 | set_irq_handler(virq, handle_level_irq); | 538 | set_irq_handler(virq, handle_level_irq); |
539 | set_irq_flags(virq, IRQF_VALID); | 539 | set_irq_flags(virq, IRQF_VALID); |