aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-pl061.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-pl061.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-pl061.c')
-rw-r--r--drivers/gpio/gpio-pl061.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
index 391766e5aeed..d2a0ad5fc752 100644
--- a/drivers/gpio/gpio-pl061.c
+++ b/drivers/gpio/gpio-pl061.c
@@ -233,23 +233,23 @@ static void pl061_irq_unmask(struct irq_data *d)
233 spin_unlock(&chip->lock); 233 spin_unlock(&chip->lock);
234} 234}
235 235
236static unsigned int pl061_irq_startup(struct irq_data *d) 236static int pl061_irq_reqres(struct irq_data *d)
237{ 237{
238 struct pl061_gpio *chip = irq_data_get_irq_chip_data(d); 238 struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
239 239
240 if (gpio_lock_as_irq(&chip->gc, irqd_to_hwirq(d))) 240 if (gpio_lock_as_irq(&chip->gc, irqd_to_hwirq(d))) {
241 dev_err(chip->gc.dev, 241 dev_err(chip->gc.dev,
242 "unable to lock HW IRQ %lu for IRQ\n", 242 "unable to lock HW IRQ %lu for IRQ\n",
243 irqd_to_hwirq(d)); 243 irqd_to_hwirq(d));
244 pl061_irq_unmask(d); 244 return -EINVAL;
245 }
245 return 0; 246 return 0;
246} 247}
247 248
248static void pl061_irq_shutdown(struct irq_data *d) 249static void pl061_irq_relres(struct irq_data *d)
249{ 250{
250 struct pl061_gpio *chip = irq_data_get_irq_chip_data(d); 251 struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
251 252
252 pl061_irq_mask(d);
253 gpio_unlock_as_irq(&chip->gc, irqd_to_hwirq(d)); 253 gpio_unlock_as_irq(&chip->gc, irqd_to_hwirq(d));
254} 254}
255 255
@@ -258,8 +258,8 @@ static struct irq_chip pl061_irqchip = {
258 .irq_mask = pl061_irq_mask, 258 .irq_mask = pl061_irq_mask,
259 .irq_unmask = pl061_irq_unmask, 259 .irq_unmask = pl061_irq_unmask,
260 .irq_set_type = pl061_irq_type, 260 .irq_set_type = pl061_irq_type,
261 .irq_startup = pl061_irq_startup, 261 .irq_request_resources = pl061_irq_reqres,
262 .irq_shutdown = pl061_irq_shutdown, 262 .irq_release_resources = pl061_irq_relres,
263}; 263};
264 264
265static int pl061_irq_map(struct irq_domain *d, unsigned int irq, 265static int pl061_irq_map(struct irq_domain *d, unsigned int irq,