gpio fixes for v6.6-rc1

- fix a regression in irqchip setup in gpio-zynq
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmT67tYACgkQEacuoBRx
 13KBkhAAiRtDo0WFHuCkHIEFxUr/0VdVamSDdYr0pSIkvN+L1ELogIL3SEFOWbYu
 vkJDxB8ej9HVsORux9mKv0F3QnJhxdRKkv7qpRm+XLwAQClgE33Y5J8TLE3ggLhm
 ztprTbktnrwjLyMKhcs7X0uOwmuXf7MRSFsfKUHdp8/EmgSoI57U8Ecl3zPdXGbh
 nfKphtwMaHHrQ0hnAfe8ZVRGkqfc9ZdSWh1fcxlKliabVRCFj4IEUQyx8J8zQX/t
 7lD0yg9eGzSZIGrovfGTnU8rCNDNITRn9e798ohBiJZgTBmXClBKTX+TLt7XCr/I
 lKic3TvwlyUKL29VhMtFSDdrVcnbEPlT1DflavDA5OCWthmNHUhjVBHYD1FSqN+a
 Zu+3eMTmn2oeZQKZjC+z+z8Y2o9Tw4nkT/SkoxmA7FyAy8SSCbUtz1/FjOjGpihp
 niPi+99gc5OKCH0EM9zf4ZbRI5LUviai6UPpa5YXH8qUsw5lq6jUE2oyv/SQLS/b
 OCsJ+cVzMJDWdWkmW7RdJHzdTy8l5Q3A0AkfV8H5m7ahp4aEnP76b8IrqH8+F6Ot
 KWhZfRyOBFqbJGbaGWx+HpE6N8qH+4LZ6VQmZ9sEpe8T99p7JZqGT0Gms1YR0Aa+
 hBg/mGKqEz0F1qdgUqm+MvKUX9hs/o2ML6bgzP7QWV/D5Htk318=
 =VqOd
 -----END PGP SIGNATURE-----

Merge tag 'gpio-fixes-for-v6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fix from Bartosz Golaszewski:

 - fix a regression in irqchip setup in gpio-zynq

* tag 'gpio-fixes-for-v6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: zynq: restore zynq_gpio_irq_reqres/zynq_gpio_irq_relres callbacks
This commit is contained in:
Linus Torvalds 2023-09-08 13:12:59 -07:00
commit d30c0d326b

View File

@ -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,