linux/drivers/gpio
Bartosz Golaszewski d578b31856 gpio: shared: fix a false-positive sharing detection with reset-gpios
After scanning the devicetree, we remove all entries that have only one
reference, while creating GPIO shared proxies for the remaining, shared
entries. However: for the reset-gpio corner-case, we will have two
references for a "reset-gpios" pin that's not really shared. In this
case one will come from the actual consumer fwnode and the other from
the potential auxiliary reset-gpio device. This causes the GPIO core to
create unnecessary GPIO shared proxy devices for pins that are not
really shared.

Add a function that can detect this situation and remove entries that
have exactly two references but one of them is a reset-gpio.

Fixes: 7b78b26757 ("gpio: shared: handle the reset-gpios corner case")
Link: https://lore.kernel.org/r/20260108-gpio-shared-false-positive-v1-1-5dbf8d1b2f7d@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-01-09 09:56:46 +01:00
..
Kconfig gpio: tb10x: fix OF_GPIO dependency 2025-12-06 11:48:19 +01:00
Makefile Immutable branch between the GPIO, ASoC and regulator trees for v6.19-rc1 2025-11-17 10:37:37 +01:00
TODO gpiolib: of: Get rid of <linux/gpio/legacy-of-mm-gpiochip.h> 2025-10-16 16:47:18 +02:00
dev-sync-probe.c
dev-sync-probe.h
gpio-74x164.c
gpio-74xx-mmio.c
gpio-104-dio-48e.c
gpio-104-idi-48.c
gpio-104-idio-16.c gpio: 104-idio-16: Define maximum valid register address offset 2025-10-21 11:46:50 +02:00
gpio-adnp.c
gpio-adp5520.c
gpio-adp5585.c
gpio-aggregator.c gpio: aggregator: restore the set_config operation 2025-11-05 11:34:26 +01:00
gpio-altera-a10sr.c
gpio-altera.c
gpio-amd-fch.c
gpio-amd8111.c
gpio-amdpt.c gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ 2025-09-24 13:52:35 +02:00
gpio-arizona.c
gpio-aspeed-sgpio.c
gpio-aspeed.c bitmap updates for v6.19 2025-12-06 09:01:27 -08:00
gpio-ath79.c
gpio-bcm-kona.c
gpio-bd9571mwv.c
gpio-bd71815.c
gpio-bd71828.c
gpio-blzp1600.c
gpio-brcmstb.c gpio: brcmstb: Use modern PM macros 2025-11-25 14:10:06 +01:00
gpio-bt8xx.c gpio: bt8xx: use generic power management 2025-10-23 09:56:05 +02:00
gpio-cadence.c gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ 2025-09-24 13:52:35 +02:00
gpio-cgbc.c
gpio-clps711x.c
gpio-creg-snps.c
gpio-cros-ec.c
gpio-crystalcove.c
gpio-cs5535.c
gpio-da9052.c
gpio-da9055.c
gpio-davinci.c
gpio-dln2.c
gpio-ds4520.c
gpio-dwapb.c gpio: dwapb: Use modern PM macros 2025-11-25 14:10:06 +01:00
gpio-eic-sprd.c
gpio-elkhartlake.c gpio: elkhartlake: Convert to auxiliary driver 2025-11-19 14:08:51 +01:00
gpio-em.c
gpio-en7523.c
gpio-ep93xx.c
gpio-exar.c
gpio-f7188x.c
gpio-ftgpio010.c
gpio-fxl6408.c gpio: fxl6408: Add suspend/resume support 2025-11-20 14:15:30 +01:00
gpio-ge.c gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ 2025-09-24 13:52:35 +02:00
gpio-gpio-mm.c
gpio-graniterapids.c
gpio-grgpio.c gpio: grgpio: call request_irq after incrementing the reference count 2025-10-13 17:33:50 +02:00
gpio-gw-pld.c
gpio-hisi.c gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ 2025-09-24 13:52:35 +02:00
gpio-hlwd.c gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ 2025-09-24 13:52:35 +02:00
gpio-htc-egpio.c gpio: htc-egpio: Use modern PM macros 2025-11-25 14:10:06 +01:00
gpio-i8255.c
gpio-i8255.h
gpio-ich.c
gpio-idio-16.c gpio: idio-16: Define fixed direction of the GPIO lines 2025-10-22 08:52:32 +02:00
gpio-idio-16.h
gpio-idt3243x.c
gpio-imx-scu.c
gpio-it87.c gpio: it87: balance superio enter/exit calls in error path 2025-12-18 11:29:42 +01:00
gpio-ixp4xx.c gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ 2025-09-24 13:52:35 +02:00
gpio-janz-ttl.c
gpio-kempld.c
gpio-latch.c gpio: latch: remove unneeded include 2025-10-21 10:35:30 +02:00
gpio-ljca.c gpio: ljca: Fix duplicated IRQ mapping 2025-10-23 14:30:11 +02:00
gpio-logicvc.c
gpio-loongson-64bit.c gpio: loongson: Switch 2K2000/3000 GPIO to BYTE_CTRL_MODE 2025-11-28 12:59:00 +01:00
gpio-loongson.c
gpio-loongson1.c
gpio-lp873x.c
gpio-lp3943.c
gpio-lp87565.c
gpio-lpc18xx.c
gpio-lpc32xx.c
gpio-macsmc.c
gpio-madera.c
gpio-max730x.c
gpio-max732x.c
gpio-max3191x.c
gpio-max7300.c
gpio-max7301.c
gpio-max7360.c gpio: max7360: Add MAX7360 gpio support 2025-09-16 15:24:48 +01:00
gpio-max77620.c
gpio-max77650.c
gpio-max77759.c
gpio-mb86s7x.c
gpio-mc33880.c
gpio-menz127.c gpio: menz127: add support for 16Z034 and 16Z037 GPIO controllers 2025-11-20 14:15:04 +01:00
gpio-merrifield.c
gpio-ml-ioh.c gpio: ml-ioh: Use modern PM macros 2025-11-25 14:10:06 +01:00
gpio-mlxbf.c
gpio-mlxbf2.c gpio: mlxbf2: Use modern PM macros 2025-11-25 14:10:06 +01:00
gpio-mlxbf3.c
gpio-mm-lantiq.c gpio: mm-lantiq: update kernel docs 2025-10-30 10:28:24 +01:00
gpio-mmio.c gpio: mmio: fix bad guard conversion 2025-12-03 12:57:40 +01:00
gpio-mockup.c
gpio-moxtet.c
gpio-mpc8xxx.c gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ 2025-09-24 13:52:35 +02:00
gpio-mpc5200.c
gpio-mpfs.c gpio: mpfs: fix setting gpio direction to output 2025-09-26 11:56:26 +02:00
gpio-mpsse.c gpio: mpsse: fix reference leak in gpio_mpsse_probe() error paths 2026-01-02 10:45:37 +01:00
gpio-msc313.c gpio: msc313: Use modern PM macros 2025-11-25 14:10:06 +01:00
gpio-mt7621.c gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ 2025-09-24 13:52:35 +02:00
gpio-mvebu.c gpio: mvebu: Slightly optimize mvebu_gpio_irq_handler() 2025-10-20 10:24:03 +02:00
gpio-mxc.c syscore: Pass context data to callbacks 2025-11-14 10:01:52 +01:00
gpio-mxs.c
gpio-nct6694.c gpio: Add Nuvoton NCT6694 GPIO support 2025-09-16 14:41:57 +01:00
gpio-nomadik.c
gpio-npcm-sgpio.c
gpio-octeon.c
gpio-omap.c gpio: omap: Use modern PM macros 2025-11-25 14:10:07 +01:00
gpio-palmas.c
gpio-pca953x.c gpio: pca953x: handle short interrupt pulses on PCAL devices 2026-01-02 10:37:35 +01:00
gpio-pca9570.c
gpio-pcf857x.c
gpio-pch.c gpio: pch: Use modern PM macros 2025-11-25 14:10:07 +01:00
gpio-pci-idio-16.c gpio: pci-idio-16: Define maximum valid register address offset 2025-10-21 11:46:50 +02:00
gpio-pcie-idio-24.c
gpio-pisosr.c
gpio-pl061.c gpio: pl061: Use modern PM macros 2025-11-25 14:10:06 +01:00
gpio-pmic-eic-sprd.c
gpio-pxa.c syscore: Pass context data to callbacks 2025-11-14 10:01:52 +01:00
gpio-qixis-fpga.c gpio: qixis-fpga: Fix a NULL vs IS_ERR() bug in probe() 2025-10-27 10:19:17 +01:00
gpio-raspberrypi-exp.c
gpio-rc5t583.c
gpio-rcar.c
gpio-rda.c gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ 2025-09-24 13:52:35 +02:00
gpio-rdc321x.c
gpio-realtek-otto.c gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ 2025-09-24 13:52:35 +02:00
gpio-reg.c
gpio-regmap.c gpio: regmap: Fix memleak in error path in gpio_regmap_register() 2025-12-05 09:29:58 +01:00
gpio-rockchip.c gpio: rockchip: mark the GPIO controller as sleeping 2026-01-07 09:30:40 +01:00
gpio-rtd.c
gpio-sa1100.c syscore: Pass context data to callbacks 2025-11-14 10:01:52 +01:00
gpio-sama5d2-piobu.c
gpio-sch.c
gpio-sch311x.c
gpio-shared-proxy.c gpio: shared-proxy: set suppress_bind_attrs 2025-11-28 09:29:31 +01:00
gpio-sifive.c gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ 2025-09-24 13:52:35 +02:00
gpio-sim.c
gpio-siox.c
gpio-sl28cpld.c
gpio-sloppy-logic-analyzer.c
gpio-sodaville.c
gpio-spacemit-k1.c gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ 2025-09-24 13:52:35 +02:00
gpio-spear-spics.c
gpio-sprd.c
gpio-stmpe.c
gpio-stp-xway.c
gpio-syscon.c
gpio-tangier.c
gpio-tangier.h
gpio-tb10x.c gpio: tb10x: Drop unused tb10x_set_bits() function 2025-11-06 18:19:44 +01:00
gpio-tc3589x.c
gpio-tegra.c
gpio-tegra186.c gpio: tegra186: Fix GPIO name collisions for Tegra410 2025-11-17 11:04:31 +01:00
gpio-thunderx.c
gpio-timberdale.c
gpio-tn48m.c
gpio-tpic2810.c
gpio-tps6586x.c
gpio-tps65086.c
gpio-tps65218.c
gpio-tps65219.c
gpio-tps65910.c
gpio-tps65912.c
gpio-tps68470.c
gpio-tqmx86.c gpio: tqmx86: Use modern PM macros 2025-11-25 14:10:07 +01:00
gpio-ts4800.c
gpio-ts4900.c
gpio-ts5500.c
gpio-twl4030.c
gpio-twl6040.c
gpio-uniphier.c gpio: uniphier: Use modern PM macros 2025-11-25 14:10:07 +01:00
gpio-usbio.c gpio: usbio: Add ACPI device-id for MTL-CVF devices 2025-10-09 12:11:29 +02:00
gpio-vf610.c gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ 2025-09-24 13:52:35 +02:00
gpio-viperboard.c
gpio-virtio.c
gpio-virtuser.c gpio: virtuser: check the return value of gpiod_set_value() 2025-10-13 09:56:16 +02:00
gpio-visconti.c
gpio-vx855.c
gpio-wcd934x.c gpio: wcd934x: mark the GPIO controller as sleeping 2025-10-10 09:37:19 +02:00
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: xgene: Use modern PM macros 2025-11-25 14:10:07 +01:00
gpio-xgs-iproc.c
gpio-xilinx.c gpio: xilinx: Use modern PM macros 2025-11-25 14:10:07 +01:00
gpio-xlp.c
gpio-xra1403.c
gpio-xtensa.c
gpio-zevio.c
gpio-zynq.c gpio: zynq: Use modern PM macros 2025-11-25 14:10:07 +01:00
gpio-zynqmp-modepin.c
gpiolib-acpi-core.c intel-gpio for v6.19-1 2025-11-25 14:04:05 +01:00
gpiolib-acpi-quirks.c gpiolib: acpi: Add quirk for Dell Precision 7780 2025-12-08 05:45:56 +01:00
gpiolib-acpi.h
gpiolib-cdev.c gpio updates for v6.19-rc1 2025-12-04 12:33:38 -08:00
gpiolib-cdev.h
gpiolib-devres.c
gpiolib-legacy.c gpiolib: legacy: Allow to kill devm_gpio_request_one() independently 2025-11-17 10:57:28 +01:00
gpiolib-of.c gpiolib: of: Get rid of <linux/gpio/legacy-of-mm-gpiochip.h> 2025-10-16 16:47:18 +02:00
gpiolib-of.h
gpiolib-shared.c gpio: shared: fix a false-positive sharing detection with reset-gpios 2026-01-09 09:56:46 +01:00
gpiolib-shared.h gpio: shared: verify con_id when adding proxy lookup 2026-01-02 10:34:31 +01:00
gpiolib-swnode.c gpio: swnode: allow referencing GPIO chips by firmware nodes 2025-11-20 16:51:48 +01:00
gpiolib-swnode.h
gpiolib-sysfs.c gpio: rename gpio_chip_hwgpio() to gpiod_hwgpio() 2025-10-21 10:35:57 +02:00
gpiolib-sysfs.h
gpiolib.c gpiolib: fix lookup table matching 2026-01-08 15:23:15 +01:00
gpiolib.h Immutable branch between the GPIO, ASoC and regulator trees for v6.19-rc1 2025-11-17 10:37:37 +01:00