android_kernel_motorola_sm6375/drivers/gpio
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Emanuele Ghidoli b26db1bb51 gpio: pca953x: fix IRQ storm on system wake up
[ Upstream commit 3e38f946062b4845961ab86b726651b4457b2af8 ]

If an input changes state during wake-up and is used as an interrupt
source, the IRQ handler reads the volatile input register to clear the
interrupt mask and deassert the IRQ line. However, the IRQ handler is
triggered before access to the register is granted, causing the read
operation to fail.

As a result, the IRQ handler enters a loop, repeatedly printing the
"failed reading register" message, until `pca953x_resume()` is eventually
called, which restores the driver context and enables access to
registers.

Fix by disabling the IRQ line before entering suspend mode, and
re-enabling it after the driver context is restored in `pca953x_resume()`.

An IRQ can be disabled with disable_irq() and still wake the system as
long as the IRQ has wake enabled, so the wake-up functionality is
preserved.

Fixes: b765743005 ("gpio: pca953x: Restore registers after suspend/resume cycle")
Cc: stable@vger.kernel.org
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20250512095441.31645-1-francesco@dolcini.it
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
[ Apply directly to suspend/resume functions ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-09 18:44:00 +02:00
..
gpio-74x164.c gpio: 74x164: Enable output pins after registers are reset 2024-03-06 14:36:10 +00:00
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-altera-a10sr.c
gpio-altera.c
gpio-amd-fch.c
gpio-amd8111.c gpio: amd8111: Fix PCI device reference count leak 2022-12-14 11:30:44 +01:00
gpio-amdpt.c
gpio-arizona.c
gpio-aspeed.c gpio: aspeed: Use devm_clk api to manage clock source 2024-11-08 16:20:45 +01:00
gpio-ath79.c
gpio-bcm-kona.c gpio: bcm-kona: Add missing newline to dev_err format string 2025-03-13 12:43:13 +01:00
gpio-bd9571mwv.c
gpio-bd70528.c
gpio-brcmstb.c
gpio-bt8xx.c
gpio-cadence.c
gpio-clps711x.c
gpio-creg-snps.c
gpio-crystalcove.c gpio: crystalcove: Use -ENOTSUPP consistently 2024-05-17 11:43:52 +02:00
gpio-cs5535.c
gpio-da9052.c
gpio-da9055.c
gpio-davinci.c gpio: davinci: fix lazy disable 2024-11-08 16:20:42 +01:00
gpio-dln2.c
gpio-dwapb.c
gpio-eic-sprd.c gpio: eic-sprd: Clear interrupt after set the interrupt type 2024-02-23 08:24:53 +01:00
gpio-em.c
gpio-ep93xx.c
gpio-exar.c
gpio-f7188x.c
gpio-ftgpio010.c
gpio-ge.c
gpio-gpio-mm.c
gpio-grgpio.c gpio: grgpio: Add NULL check in grgpio_probe 2024-12-14 19:44:47 +01:00
gpio-gw-pld.c
gpio-hlwd.c
gpio-htc-egpio.c
gpio-ich.c
gpio-intel-mid.c
gpio-iop.c
gpio-it87.c
gpio-ixp4xx.c
gpio-janz-ttl.c
gpio-kempld.c
gpio-loongson.c
gpio-loongson1.c
gpio-lp873x.c
gpio-lp3943.c
gpio-lp87565.c
gpio-lpc18xx.c
gpio-lpc32xx.c
gpio-lynxpoint.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-mc9s08dz60.c
gpio-mc33880.c
gpio-menz127.c
gpio-merrifield.c
gpio-ml-ioh.c
gpio-mlxbf.c
gpio-mm-lantiq.c
gpio-mmio.c
gpio-mockup.c gpio: mockup: Fix mode of debugfs files 2023-05-30 12:44:09 +01:00
gpio-moxtet.c
gpio-mpc8xxx.c gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx 2022-09-28 11:03:57 +02:00
gpio-mpc5200.c
gpio-msic.c
gpio-mt7621.c
gpio-mvebu.c gpio: mvebu/pwm: Refuse requests with inverted polarity 2022-05-25 09:14:37 +02:00
gpio-mxc.c gpio: mxc: Always set GPIOs used as interrupt source to INPUT mode 2023-02-06 07:52:37 +01:00
gpio-mxs.c
gpio-octeon.c
gpio-omap.c
gpio-palmas.c
gpio-pca953x.c gpio: pca953x: fix IRQ storm on system wake up 2025-09-09 18:44:00 +02:00
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: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip 2023-10-10 21:46:39 +02:00
gpio-pxa.c gpio: pxa: disable pinctrl calls for MMP_GPIO 2023-10-10 21:46:45 +02:00
gpio-raspberrypi-exp.c
gpio-rc5t583.c
gpio-rcar.c gpio: rcar: Fix missing of_node_put() call 2025-03-13 12:43:30 +01:00
gpio-rdc321x.c
gpio-reg.c
gpio-sa1100.c
gpio-sama5d2-piobu.c
gpio-sch.c
gpio-sch311x.c
gpio-siox.c
gpio-sodaville.c
gpio-spear-spics.c
gpio-sprd.c
gpio-sta2x11.c
gpio-stmpe.c gpio: stmpe: Check return value of stmpe_reg_read in stmpe_gpio_irq_sync_unlock 2025-03-13 12:43:16 +01:00
gpio-stp-xway.c
gpio-syscon.c
gpio-tb10x.c gpio: tb10x: Fix an error handling path in tb10x_gpio_probe() 2023-10-10 21:46:38 +02:00
gpio-tc3589x.c
gpio-tegra.c
gpio-tegra186.c gpio: tegra186: Fix chip_data type confusion 2022-03-02 11:41:17 +01:00
gpio-thunderx.c
gpio-timberdale.c gpio: timberdale: Fix potential deadlock on &tgpio->lock 2023-10-25 11:53:23 +02:00
gpio-tpic2810.c
gpio-tps6586x.c
gpio-tps65086.c
gpio-tps65218.c
gpio-tps65910.c
gpio-tps65912.c gpio: tps65912: check the return value of regmap_update_bits() 2025-08-28 16:21:25 +02:00
gpio-tps68470.c gpio: tps68470: Make tps68470_gpio_output() always set the initial value 2023-08-11 11:53:44 +02:00
gpio-tqmx86.c
gpio-ts4800.c
gpio-ts4900.c gpio: ts4900: Do not set DAT and OE together 2022-03-16 13:21:46 +01:00
gpio-ts5500.c
gpio-twl4030.c
gpio-twl6040.c
gpio-ucb1400.c
gpio-uniphier.c
gpio-vf610.c gpio: vf610: set value before the direction to avoid a glitch 2023-10-25 11:53:24 +02:00
gpio-viperboard.c
gpio-vr41xx.c MIPS: Remove repetitive increase irq_err_count 2022-06-29 08:58:46 +02:00
gpio-vx855.c
gpio-wcove.c gpio: wcove: Use -ENOTSUPP consistently 2024-05-17 11:43:52 +02:00
gpio-winbond.c gpio: winbond: Fix error code in winbond_gpio_get() 2022-06-29 08:58:47 +02:00
gpio-wm831x.c
gpio-wm8350.c
gpio-wm8994.c
gpio-ws16c48.c
gpio-xgene-sb.c
gpio-xgene.c
gpio-xilinx.c
gpio-xlp.c
gpio-xra1403.c
gpio-xtensa.c
gpio-zevio.c
gpio-zx.c
gpio-zynq.c gpio: zynq: Fix wakeup source leaks on device unbind 2025-05-02 07:39:17 +02:00
gpiolib-acpi.c gpiolib: acpi: Ignore touchpad wakeup on GPD G1619-04 2024-02-23 08:24:52 +01:00
gpiolib-acpi.h
gpiolib-devprop.c
gpiolib-devres.c
gpiolib-legacy.c
gpiolib-of.c gpio: gpiolib-of: Fix refcount bugs in of_mm_gpiochip_add_data() 2022-08-25 11:17:57 +02:00
gpiolib-of.h
gpiolib-sysfs.c gpiolib: sysfs: Fix error handling on failed export 2023-12-13 18:18:15 +01:00
gpiolib.c gpio: prevent potential speculation leaks in gpio_device_get_desc() 2024-11-08 16:20:26 +01:00
gpiolib.h
Kconfig gpio: tqmx86: fix typo in Kconfig label 2024-07-05 09:08:16 +02:00
Makefile
sgpio-aspeed.c
TODO