aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-em.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/gpio/gpio-em.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/gpio/gpio-em.c')
-rw-r--r--drivers/gpio/gpio-em.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
index 1e98a9873967..8765bd6f48e1 100644
--- a/drivers/gpio/gpio-em.c
+++ b/drivers/gpio/gpio-em.c
@@ -99,23 +99,23 @@ static void em_gio_irq_enable(struct irq_data *d)
99 em_gio_write(p, GIO_IEN, BIT(irqd_to_hwirq(d))); 99 em_gio_write(p, GIO_IEN, BIT(irqd_to_hwirq(d)));
100} 100}
101 101
102static unsigned int em_gio_irq_startup(struct irq_data *d) 102static int em_gio_irq_reqres(struct irq_data *d)
103{ 103{
104 struct em_gio_priv *p = irq_data_get_irq_chip_data(d); 104 struct em_gio_priv *p = irq_data_get_irq_chip_data(d);
105 105
106 if (gpio_lock_as_irq(&p->gpio_chip, irqd_to_hwirq(d))) 106 if (gpio_lock_as_irq(&p->gpio_chip, irqd_to_hwirq(d))) {
107 dev_err(p->gpio_chip.dev, 107 dev_err(p->gpio_chip.dev,
108 "unable to lock HW IRQ %lu for IRQ\n", 108 "unable to lock HW IRQ %lu for IRQ\n",
109 irqd_to_hwirq(d)); 109 irqd_to_hwirq(d));
110 em_gio_irq_enable(d); 110 return -EINVAL;
111 }
111 return 0; 112 return 0;
112} 113}
113 114
114static void em_gio_irq_shutdown(struct irq_data *d) 115static void em_gio_irq_relres(struct irq_data *d)
115{ 116{
116 struct em_gio_priv *p = irq_data_get_irq_chip_data(d); 117 struct em_gio_priv *p = irq_data_get_irq_chip_data(d);
117 118
118 em_gio_irq_disable(d);
119 gpio_unlock_as_irq(&p->gpio_chip, irqd_to_hwirq(d)); 119 gpio_unlock_as_irq(&p->gpio_chip, irqd_to_hwirq(d));
120} 120}
121 121
@@ -359,8 +359,8 @@ static int em_gio_probe(struct platform_device *pdev)
359 irq_chip->irq_mask = em_gio_irq_disable; 359 irq_chip->irq_mask = em_gio_irq_disable;
360 irq_chip->irq_unmask = em_gio_irq_enable; 360 irq_chip->irq_unmask = em_gio_irq_enable;
361 irq_chip->irq_set_type = em_gio_irq_set_type; 361 irq_chip->irq_set_type = em_gio_irq_set_type;
362 irq_chip->irq_startup = em_gio_irq_startup; 362 irq_chip->irq_request_resources = em_gio_irq_reqres;
363 irq_chip->irq_shutdown = em_gio_irq_shutdown; 363 irq_chip->irq_release_resources = em_gio_irq_relres;
364 irq_chip->flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND; 364 irq_chip->flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND;
365 365
366 p->irq_domain = irq_domain_add_simple(pdev->dev.of_node, 366 p->irq_domain = irq_domain_add_simple(pdev->dev.of_node,