aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sirf/pinctrl-sirf.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2014-03-14 13:16:20 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-03-18 04:28:30 -0400
commit57ef04288abd27a717287a652d324f95cb77c3c6 (patch)
tree2cb5e15f0325e6860b008da5997e5f63d4cf6171 /drivers/pinctrl/sirf/pinctrl-sirf.c
parent1d4a2166f9501fd5b564b33414a2aa9c493fdfb8 (diff)
gpio: switch drivers to use new callback
This switches all GPIO and pin control drivers with irqchips that were using .startup() and .shutdown() callbacks to lock GPIO lines for IRQ usage over to using the .request_resources() and .release_resources() callbacks just introduced into the irqchip vtable. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jean-Jacques Hiblot <jjhiblot@traphandler.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/sirf/pinctrl-sirf.c')
-rw-r--r--drivers/pinctrl/sirf/pinctrl-sirf.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c b/drivers/pinctrl/sirf/pinctrl-sirf.c
index 617a4916b50f..3ce6e258bc80 100644
--- a/drivers/pinctrl/sirf/pinctrl-sirf.c
+++ b/drivers/pinctrl/sirf/pinctrl-sirf.c
@@ -594,23 +594,23 @@ static int sirfsoc_gpio_irq_type(struct irq_data *d, unsigned type)
594 return 0; 594 return 0;
595} 595}
596 596
597static unsigned int sirfsoc_gpio_irq_startup(struct irq_data *d) 597static int sirfsoc_gpio_irq_reqres(struct irq_data *d)
598{ 598{
599 struct sirfsoc_gpio_bank *bank = irq_data_get_irq_chip_data(d); 599 struct sirfsoc_gpio_bank *bank = irq_data_get_irq_chip_data(d);
600 600
601 if (gpio_lock_as_irq(&bank->chip.gc, d->hwirq % SIRFSOC_GPIO_BANK_SIZE)) 601 if (gpio_lock_as_irq(&bank->chip.gc, d->hwirq % SIRFSOC_GPIO_BANK_SIZE)) {
602 dev_err(bank->chip.gc.dev, 602 dev_err(bank->chip.gc.dev,
603 "unable to lock HW IRQ %lu for IRQ\n", 603 "unable to lock HW IRQ %lu for IRQ\n",
604 d->hwirq); 604 d->hwirq);
605 sirfsoc_gpio_irq_unmask(d); 605 return -EINVAL;
606 }
606 return 0; 607 return 0;
607} 608}
608 609
609static void sirfsoc_gpio_irq_shutdown(struct irq_data *d) 610static void sirfsoc_gpio_irq_relres(struct irq_data *d)
610{ 611{
611 struct sirfsoc_gpio_bank *bank = irq_data_get_irq_chip_data(d); 612 struct sirfsoc_gpio_bank *bank = irq_data_get_irq_chip_data(d);
612 613
613 sirfsoc_gpio_irq_mask(d);
614 gpio_unlock_as_irq(&bank->chip.gc, d->hwirq % SIRFSOC_GPIO_BANK_SIZE); 614 gpio_unlock_as_irq(&bank->chip.gc, d->hwirq % SIRFSOC_GPIO_BANK_SIZE);
615} 615}
616 616
@@ -620,8 +620,8 @@ static struct irq_chip sirfsoc_irq_chip = {
620 .irq_mask = sirfsoc_gpio_irq_mask, 620 .irq_mask = sirfsoc_gpio_irq_mask,
621 .irq_unmask = sirfsoc_gpio_irq_unmask, 621 .irq_unmask = sirfsoc_gpio_irq_unmask,
622 .irq_set_type = sirfsoc_gpio_irq_type, 622 .irq_set_type = sirfsoc_gpio_irq_type,
623 .irq_startup = sirfsoc_gpio_irq_startup, 623 .irq_request_resources = sirfsoc_gpio_irq_reqres,
624 .irq_shutdown = sirfsoc_gpio_irq_shutdown, 624 .irq_release_resources = sirfsoc_gpio_irq_relres,
625}; 625};
626 626
627static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc) 627static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc)