linux-stable/drivers/gpio
Mario Limonciello 06fb4ecfea gpio: Request interrupts after IRQ is initialized
Commit 5467801f1f ("gpio: Restrict usage of GPIO chip irq members
before initialization") attempted to fix a race condition that lead to a
NULL pointer, but in the process caused a regression for _AEI/_EVT
declared GPIOs.

This manifests in messages showing deferred probing while trying to
allocate IRQs like so:

  amd_gpio AMDI0030:00: Failed to translate GPIO pin 0x0000 to IRQ, err -517
  amd_gpio AMDI0030:00: Failed to translate GPIO pin 0x002C to IRQ, err -517
  amd_gpio AMDI0030:00: Failed to translate GPIO pin 0x003D to IRQ, err -517
  [ .. more of the same .. ]

The code for walking _AEI doesn't handle deferred probing and so this
leads to non-functional GPIO interrupts.

Fix this issue by moving the call to `acpi_gpiochip_request_interrupts`
to occur after gc->irc.initialized is set.

Fixes: 5467801f1f ("gpio: Restrict usage of GPIO chip irq members before initialization")
Link: https://lore.kernel.org/linux-gpio/BL1PR12MB51577A77F000A008AA694675E2EF9@BL1PR12MB5157.namprd12.prod.outlook.com/
Link: https://bugzilla.suse.com/show_bug.cgi?id=1198697
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215850
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1979
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1976
Reported-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Shreeya Patel <shreeya.patel@collabora.com>
Tested-By: Samuel Čavoj <samuel@cavoj.net>
Tested-By: lukeluk498@gmail.com Link:
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-and-tested-by: Takashi Iwai <tiwai@suse.de>
Cc: Shreeya Patel <shreeya.patel@collabora.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-04-22 13:59:19 -07:00
..
gpio-74x164.c
gpio-74xx-mmio.c
gpio-104-dio-48e.c
gpio-104-idi-48.c
gpio-104-idio-16.c
gpio-adnp.c
gpio-adp5520.c
gpio-adp5588.c
gpio-aggregator.c
gpio-altera-a10sr.c
gpio-altera.c
gpio-amd-fch.c
gpio-amd8111.c
gpio-amdpt.c
gpio-arizona.c
gpio-aspeed-sgpio.c
gpio-aspeed.c
gpio-ath79.c
gpio-bcm-kona.c
gpio-bd9571mwv.c
gpio-bd71815.c
gpio-bd71828.c
gpio-brcmstb.c
gpio-bt8xx.c
gpio-cadence.c
gpio-clps711x.c
gpio-creg-snps.c
gpio-crystalcove.c
gpio-cs5535.c
gpio-da9052.c
gpio-da9055.c
gpio-davinci.c
gpio-dln2.c
gpio-dwapb.c
gpio-eic-sprd.c
gpio-em.c
gpio-en7523.c
gpio-ep93xx.c
gpio-exar.c
gpio-f7188x.c
gpio-ftgpio010.c
gpio-ge.c
gpio-gpio-mm.c
gpio-grgpio.c
gpio-gw-pld.c
gpio-hisi.c
gpio-hlwd.c
gpio-htc-egpio.c
gpio-ich.c
gpio-idt3243x.c
gpio-iop.c
gpio-it87.c
gpio-ixp4xx.c
gpio-janz-ttl.c
gpio-kempld.c
gpio-logicvc.c
gpio-loongson.c
gpio-loongson1.c
gpio-lp873x.c
gpio-lp3943.c
gpio-lp87565.c
gpio-lpc18xx.c
gpio-lpc32xx.c
gpio-madera.c
gpio-max730x.c
gpio-max732x.c
gpio-max3191x.c
gpio-max7300.c
gpio-max7301.c
gpio-max77620.c
gpio-max77650.c
gpio-mb86s7x.c
gpio-mc33880.c
gpio-menz127.c
gpio-merrifield.c
gpio-ml-ioh.c
gpio-mlxbf.c
gpio-mlxbf2.c
gpio-mm-lantiq.c
gpio-mmio.c
gpio-mockup.c
gpio-moxtet.c
gpio-mpc8xxx.c
gpio-mpc5200.c
gpio-msc313.c
gpio-mt7621.c
gpio-mvebu.c
gpio-mxc.c
gpio-mxs.c
gpio-octeon.c
gpio-omap.c
gpio-palmas.c
gpio-pca953x.c
gpio-pca9570.c
gpio-pcf857x.c
gpio-pch.c
gpio-pci-idio-16.c
gpio-pcie-idio-24.c
gpio-pisosr.c
gpio-pl061.c
gpio-pmic-eic-sprd.c
gpio-pxa.c
gpio-raspberrypi-exp.c
gpio-rc5t583.c
gpio-rcar.c
gpio-rda.c
gpio-rdc321x.c
gpio-realtek-otto.c
gpio-reg.c
gpio-regmap.c
gpio-rockchip.c
gpio-sa1100.c
gpio-sama5d2-piobu.c
gpio-sch.c
gpio-sch311x.c
gpio-sifive.c
gpio-sim.c gpio: sim: fix setting and getting multiple lines 2022-04-14 10:29:20 +02:00
gpio-siox.c
gpio-sl28cpld.c
gpio-sodaville.c
gpio-spear-spics.c
gpio-sprd.c
gpio-sta2x11.c
gpio-stmpe.c
gpio-stp-xway.c
gpio-syscon.c
gpio-tb10x.c
gpio-tc3589x.c
gpio-tegra.c
gpio-tegra186.c
gpio-thunderx.c
gpio-timberdale.c
gpio-tn48m.c
gpio-tpic2810.c
gpio-tps6586x.c
gpio-tps65086.c
gpio-tps65218.c
gpio-tps65910.c
gpio-tps65912.c
gpio-tps68470.c
gpio-tqmx86.c
gpio-ts4800.c
gpio-ts4900.c gpio fixes for v5.18-rc1 2022-04-01 10:26:09 -07:00
gpio-ts5500.c gpio: ts5500: Fix Links to Technologic Systems web resources 2022-03-31 16:44:57 +02:00
gpio-twl4030.c
gpio-twl6040.c
gpio-ucb1400.c
gpio-uniphier.c
gpio-vf610.c
gpio-viperboard.c
gpio-virtio.c
gpio-visconti.c
gpio-vr41xx.c
gpio-vx855.c
gpio-wcd934x.c
gpio-wcove.c
gpio-winbond.c
gpio-wm831x.c
gpio-wm8350.c
gpio-wm8994.c
gpio-ws16c48.c
gpio-xgene-sb.c
gpio-xgene.c
gpio-xgs-iproc.c
gpio-xilinx.c
gpio-xlp.c
gpio-xra1403.c
gpio-xtensa.c
gpio-zevio.c
gpio-zynq.c
gpio-zynqmp-modepin.c
gpiolib-acpi.c gpiolib: acpi: Convert type for pin to be unsigned 2022-04-08 15:13:22 +03:00
gpiolib-acpi.h
gpiolib-cdev.c
gpiolib-cdev.h
gpiolib-devres.c
gpiolib-legacy.c
gpiolib-of.c
gpiolib-of.h
gpiolib-sysfs.c gpio updates for v5.18-rc1 2022-03-25 12:28:23 -07:00
gpiolib-sysfs.h
gpiolib.c gpio: Request interrupts after IRQ is initialized 2022-04-22 13:59:19 -07:00
gpiolib.h gpio updates for v5.18-rc1 2022-03-25 12:28:23 -07:00
Kconfig Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
Makefile Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
TODO