original_kernel/drivers/gpio
Devyn Liu adbc49a5a8 gpiolib: acpi: Fix failed in acpi_gpiochip_find() by adding parent node match
Previous patch modified the standard used by acpi_gpiochip_find()
to match device nodes. Using the device node set in gc->gpiodev->d-
ev instead of gc->parent.

However, there is a situation in gpio-dwapb where the GPIO device
driver will set gc->fwnode for each port corresponding to a child
node under a GPIO device, so gc->gpiodev->dev will be assigned the
value of each child node in gpiochip_add_data().

gpio-dwapb.c:
128,31 static int dwapb_gpio_add_port(struct dwapb_gpio *gpio,
			       struct dwapb_port_property *pp,
			       unsigned int offs);
port->gc.fwnode = pp->fwnode;

693,39 static int dwapb_gpio_probe;
err = dwapb_gpio_add_port(gpio, &pdata->properties[i], i);

When other drivers request GPIO pin resources through the GPIO device
node provided by ACPI (corresponding to the parent node), the change
of the matching object to gc->gpiodev->dev in acpi_gpiochip_find()
only allows finding the value of each port (child node), resulting
in a failed request.

Reapply the condition of using gc->parent for match in acpi_gpio-
chip_find() in the code can compatible with the problem of gpio-dwapb,
and will not affect the two cases mentioned in the patch:
1. There is no setting for gc->fwnode.
2. The case that depends on using gc->fwnode for match.

Fixes: 5062e4c14b ("gpiolib: acpi: use the fwnode in acpi_gpiochip_find()")
Fixes: 067dbc1ea5 ("gpiolib: acpi: Don't use GPIO chip fwnode in acpi_gpiochip_find()")
Signed-off-by: Devyn Liu <liudingyuan@huawei.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-05-21 18:46:45 +03:00
..
Kconfig gpio updates for v6.10-rc1 2024-05-14 15:07:07 -07:00
Makefile gpio: Add Intel Granite Rapids-D vGPIO driver 2024-04-25 14:57:28 +03:00
TODO
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-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: brcmstb: add support for gpio-ranges 2024-04-26 09:32:54 +02:00
gpio-bt8xx.c
gpio-cadence.c
gpio-clps711x.c
gpio-creg-snps.c
gpio-cros-ec.c gpio: cros-ec: provide ID table for avoiding fallback match 2024-04-02 10:58:21 +02:00
gpio-crystalcove.c gpio: crystalcove: Use -ENOTSUPP consistently 2024-04-05 20:12:39 +03:00
gpio-cs5535.c
gpio-da9052.c
gpio-da9055.c
gpio-davinci.c
gpio-dln2.c
gpio-ds4520.c
gpio-dwapb.c
gpio-eic-sprd.c
gpio-elkhartlake.c
gpio-em.c
gpio-en7523.c
gpio-ep93xx.c
gpio-exar.c
gpio-f7188x.c
gpio-ftgpio010.c
gpio-fxl6408.c
gpio-ge.c
gpio-gpio-mm.c
gpio-graniterapids.c gpio: Add Intel Granite Rapids-D vGPIO driver 2024-04-25 14:57:28 +03:00
gpio-grgpio.c
gpio-gw-pld.c
gpio-hisi.c
gpio-hlwd.c
gpio-htc-egpio.c
gpio-i8255.c
gpio-i8255.h
gpio-ich.c
gpio-idio-16.c
gpio-idio-16.h
gpio-idt3243x.c
gpio-imx-scu.c
gpio-it87.c
gpio-ixp4xx.c
gpio-janz-ttl.c
gpio-kempld.c
gpio-latch.c
gpio-ljca.c
gpio-logicvc.c
gpio-loongson-64bit.c
gpio-loongson.c
gpio-loongson1.c
gpio-lp873x.c
gpio-lp3943.c
gpio-lp87565.c
gpio-lpc18xx.c
gpio-lpc32xx.c gpio: lpc32xx: fix module autoloading 2024-04-12 21:30:58 +02:00
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-mlxbf3.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-nomadik.c
gpio-npcm-sgpio.c gpio: nuvoton: Fix sgpio irq handle error 2024-05-07 09:44:33 +02:00
gpio-octeon.c
gpio-omap.c
gpio-palmas.c
gpio-pca953x.c gpiolib: acpi: Pass con_id instead of property into acpi_dev_gpio_irq_get_by() 2024-04-15 16:12:18 +03:00
gpio-pca9570.c
gpio-pcf857x.c
gpio-pch.c
gpio-pci-idio-16.c
gpio-pcie-idio-24.c gpio: pcie-idio-24: Use -ENOTSUPP consistently 2024-04-12 21:36:18 +02:00
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: regmap: Use -ENOTSUPP consistently 2024-04-12 21:36:40 +02:00
gpio-rockchip.c
gpio-rtd.c
gpio-sa1100.c
gpio-sama5d2-piobu.c
gpio-sch.c gpio: sch: Utilise temporary variable for struct device 2024-04-15 16:12:18 +03:00
gpio-sch311x.c
gpio-sifive.c
gpio-sim.c
gpio-siox.c
gpio-sl28cpld.c
gpio-sodaville.c
gpio-spear-spics.c
gpio-sprd.c
gpio-stmpe.c
gpio-stp-xway.c
gpio-syscon.c
gpio-tangier.c gpio: tangier: Use correct type for the IRQ chip data 2024-04-12 23:41:05 +03:00
gpio-tangier.h
gpio-tb10x.c
gpio-tc3589x.c
gpio-tegra.c
gpio-tegra186.c gpio: tegra186: Fix tegra186_gpio_is_accessible() check 2024-04-24 15:31:41 +02: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-ts4800.c
gpio-ts4900.c
gpio-ts5500.c
gpio-twl4030.c
gpio-twl6040.c
gpio-uniphier.c
gpio-vf610.c
gpio-viperboard.c
gpio-virtio.c
gpio-visconti.c
gpio-vx855.c
gpio-wcd934x.c
gpio-wcove.c gpio: wcove: Use -ENOTSUPP consistently 2024-04-05 20:12:03 +03:00
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: Fix failed in acpi_gpiochip_find() by adding parent node match 2024-05-21 18:46:45 +03:00
gpiolib-acpi.h
gpiolib-cdev.c gpiolib: cdev: fix uninitialised kfifo 2024-05-10 16:38:27 +02:00
gpiolib-cdev.h
gpiolib-devres.c
gpiolib-legacy.c gpiolib: Get rid of never false gpio_is_valid() calls 2024-04-17 22:46:44 +02:00
gpiolib-of.c gpio: of: support gpio-ranges for multiple gpiochip devices 2024-04-26 09:32:54 +02:00
gpiolib-of.h
gpiolib-swnode.c gpio: swnode: Add ability to specify native chip selects for SPI 2024-04-16 20:00:27 +09:00
gpiolib-swnode.h
gpiolib-sysfs.c gpiolib: Get rid of never false gpio_is_valid() calls 2024-04-17 22:46:44 +02:00
gpiolib-sysfs.h
gpiolib.c gpio updates for v6.10-rc1 2024-05-14 15:07:07 -07:00
gpiolib.h gpio updates for v6.10-rc1 2024-05-14 15:07:07 -07:00