mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-04 04:02:26 +00:00
gpio: zynq: restore zynq_gpio_irq_reqres/zynq_gpio_irq_relres callbacks
Commitf569143935
("gpio: zynq: fix zynqmp_gpio not an immutable chip warning") ditched the open-coded resource allocation handlers in favor of the generic ones. These generic handlers don't maintain the PM runtime anymore, which causes a regression in that level IRQs are no longer reported. Restore the original handlers to fix this. Signed-off-by: Daniel Mack <daniel@zonque.org> Fixes:f569143935
("gpio: zynq: fix zynqmp_gpio not an immutable chip warning") Cc: stable@kernel.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
parent
65d6e954e3
commit
180b10bd16
@ -575,6 +575,26 @@ static int zynq_gpio_set_wake(struct irq_data *data, unsigned int on)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int zynq_gpio_irq_reqres(struct irq_data *d)
|
||||
{
|
||||
struct gpio_chip *chip = irq_data_get_irq_chip_data(d);
|
||||
int ret;
|
||||
|
||||
ret = pm_runtime_resume_and_get(chip->parent);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return gpiochip_reqres_irq(chip, d->hwirq);
|
||||
}
|
||||
|
||||
static void zynq_gpio_irq_relres(struct irq_data *d)
|
||||
{
|
||||
struct gpio_chip *chip = irq_data_get_irq_chip_data(d);
|
||||
|
||||
gpiochip_relres_irq(chip, d->hwirq);
|
||||
pm_runtime_put(chip->parent);
|
||||
}
|
||||
|
||||
/* irq chip descriptor */
|
||||
static const struct irq_chip zynq_gpio_level_irqchip = {
|
||||
.name = DRIVER_NAME,
|
||||
@ -584,9 +604,10 @@ static const struct irq_chip zynq_gpio_level_irqchip = {
|
||||
.irq_unmask = zynq_gpio_irq_unmask,
|
||||
.irq_set_type = zynq_gpio_set_irq_type,
|
||||
.irq_set_wake = zynq_gpio_set_wake,
|
||||
.irq_request_resources = zynq_gpio_irq_reqres,
|
||||
.irq_release_resources = zynq_gpio_irq_relres,
|
||||
.flags = IRQCHIP_EOI_THREADED | IRQCHIP_EOI_IF_HANDLED |
|
||||
IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_IMMUTABLE,
|
||||
GPIOCHIP_IRQ_RESOURCE_HELPERS,
|
||||
};
|
||||
|
||||
static const struct irq_chip zynq_gpio_edge_irqchip = {
|
||||
@ -597,8 +618,9 @@ static const struct irq_chip zynq_gpio_edge_irqchip = {
|
||||
.irq_unmask = zynq_gpio_irq_unmask,
|
||||
.irq_set_type = zynq_gpio_set_irq_type,
|
||||
.irq_set_wake = zynq_gpio_set_wake,
|
||||
.irq_request_resources = zynq_gpio_irq_reqres,
|
||||
.irq_release_resources = zynq_gpio_irq_relres,
|
||||
.flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_IMMUTABLE,
|
||||
GPIOCHIP_IRQ_RESOURCE_HELPERS,
|
||||
};
|
||||
|
||||
static void zynq_gpio_handle_bank_irq(struct zynq_gpio *gpio,
|
||||
|
Loading…
Reference in New Issue
Block a user