diff options
Diffstat (limited to 'drivers/pinctrl/pinctrl-at91.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-at91.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index f4cd0b9b2438..a4814066ea08 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c | |||
@@ -1477,28 +1477,25 @@ static void gpio_irq_ack(struct irq_data *d) | |||
1477 | /* the interrupt is already cleared before by reading ISR */ | 1477 | /* the interrupt is already cleared before by reading ISR */ |
1478 | } | 1478 | } |
1479 | 1479 | ||
1480 | static unsigned int gpio_irq_startup(struct irq_data *d) | 1480 | static int gpio_irq_request_res(struct irq_data *d) |
1481 | { | 1481 | { |
1482 | struct at91_gpio_chip *at91_gpio = irq_data_get_irq_chip_data(d); | 1482 | struct at91_gpio_chip *at91_gpio = irq_data_get_irq_chip_data(d); |
1483 | unsigned pin = d->hwirq; | 1483 | unsigned pin = d->hwirq; |
1484 | int ret; | 1484 | int ret; |
1485 | 1485 | ||
1486 | ret = gpiochip_lock_as_irq(&at91_gpio->chip, pin); | 1486 | ret = gpiochip_lock_as_irq(&at91_gpio->chip, pin); |
1487 | if (ret) { | 1487 | if (ret) |
1488 | dev_err(at91_gpio->chip.dev, "unable to lock pind %lu IRQ\n", | 1488 | dev_err(at91_gpio->chip.dev, "unable to lock pind %lu IRQ\n", |
1489 | d->hwirq); | 1489 | d->hwirq); |
1490 | return ret; | 1490 | |
1491 | } | 1491 | return ret; |
1492 | gpio_irq_unmask(d); | ||
1493 | return 0; | ||
1494 | } | 1492 | } |
1495 | 1493 | ||
1496 | static void gpio_irq_shutdown(struct irq_data *d) | 1494 | static void gpio_irq_release_res(struct irq_data *d) |
1497 | { | 1495 | { |
1498 | struct at91_gpio_chip *at91_gpio = irq_data_get_irq_chip_data(d); | 1496 | struct at91_gpio_chip *at91_gpio = irq_data_get_irq_chip_data(d); |
1499 | unsigned pin = d->hwirq; | 1497 | unsigned pin = d->hwirq; |
1500 | 1498 | ||
1501 | gpio_irq_mask(d); | ||
1502 | gpiochip_unlock_as_irq(&at91_gpio->chip, pin); | 1499 | gpiochip_unlock_as_irq(&at91_gpio->chip, pin); |
1503 | } | 1500 | } |
1504 | 1501 | ||
@@ -1577,8 +1574,8 @@ void at91_pinctrl_gpio_resume(void) | |||
1577 | static struct irq_chip gpio_irqchip = { | 1574 | static struct irq_chip gpio_irqchip = { |
1578 | .name = "GPIO", | 1575 | .name = "GPIO", |
1579 | .irq_ack = gpio_irq_ack, | 1576 | .irq_ack = gpio_irq_ack, |
1580 | .irq_startup = gpio_irq_startup, | 1577 | .irq_request_resources = gpio_irq_request_res, |
1581 | .irq_shutdown = gpio_irq_shutdown, | 1578 | .irq_release_resources = gpio_irq_release_res, |
1582 | .irq_disable = gpio_irq_mask, | 1579 | .irq_disable = gpio_irq_mask, |
1583 | .irq_mask = gpio_irq_mask, | 1580 | .irq_mask = gpio_irq_mask, |
1584 | .irq_unmask = gpio_irq_unmask, | 1581 | .irq_unmask = gpio_irq_unmask, |