linux/drivers
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
..
accel The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
accessibility
acpi IOMMU Updates for Linux v6.10 2024-05-18 10:55:13 -07:00
amba
android
ata SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
atm atm/fore200e: Delete unused 'fore200e_boards' 2024-05-06 18:26:47 -07:00
auxdisplay
base Misc fixes: 2024-05-19 11:38:15 -07:00
bcma
block The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
bluetooth MMC core: 2024-05-16 08:56:49 -07:00
bus Networking changes for 6.10. 2024-05-14 19:42:24 -07:00
cache
cdrom
cdx
char The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
clk I'm actually surprised this time. There aren't any new Qualcomm SoC clk 2024-05-18 12:48:37 -07:00
clocksource clocksource/drivers/arm_arch_timer: Mark hisi_161010101_oem_info const 2024-05-10 10:43:21 +02:00
comedi
connector
counter
cpufreq powerpc updates for 6.10 2024-05-17 09:05:46 -07:00
cpuidle pmdomain core: 2024-05-16 08:50:32 -07:00
crypto This push fixes a bug in the new ecc P521 code as well as a buggy 2024-05-20 08:47:54 -07:00
cxl CXL changes for v6.10 merge window 2024-05-15 14:32:27 -07:00
dax The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
dca
devfreq PM / devfreq: exynos: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions 2024-05-09 00:30:37 +09:00
dio
dma ARM development updates for v6.10-rc1 2024-05-17 08:53:47 -07:00
dma-buf
dpll dpll: fix return value check for kmemdup 2024-05-13 16:53:53 -07:00
edac - Have skx_edac decode error addresses belonging to SGX properly 2024-05-14 08:31:10 -07:00
eisa alpha: remove DECpc AXP150 (Jensen) support 2024-05-03 22:09:50 +02:00
extcon
firewire firewire updates for v6.10 2024-05-14 18:57:22 -07:00
firmware dmi updates for v6.10 2024-05-20 09:25:10 -07:00
fpga fpga: dfl-pci: add PCI subdevice ID for Intel D5005 card 2024-04-26 12:14:28 +08:00
fsi
gnss
gpio gpiolib: acpi: Fix failed in acpi_gpiochip_find() by adding parent node match 2024-05-21 18:46:45 +03:00
gpu I2C core removes an argument from the i2c_mux_add_adapter() call to 2024-05-20 08:55:18 -07:00
greybus
hid Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
hsi
hte
hv Merge branches 'arm/renesas', 'arm/smmu', 'x86/amd', 'core' and 'x86/vt-d' into next 2024-05-13 14:06:54 +02:00
hwmon pwm: Changes for v6.10-rc1 2024-05-14 15:03:19 -07:00
hwspinlock
hwtracing Mainly singleton patches, documented in their respective changelogs. 2024-05-19 14:02:03 -07:00
i2c I2C core removes an argument from the i2c_mux_add_adapter() call to 2024-05-20 08:55:18 -07:00
i3c
idle
iio I2C core removes an argument from the i2c_mux_add_adapter() call to 2024-05-20 08:55:18 -07:00
infiniband RDMA v6.10 merge window 2024-05-18 13:04:15 -07:00
input ARM development updates for v6.10-rc1 2024-05-17 08:53:47 -07:00
interconnect
iommu dma-mapping updates for Linux 6.10 2024-05-20 10:23:39 -07:00
ipack
irqchip Updates for the interrupt subsystem: 2024-05-14 09:47:14 -07:00
isdn
leds
macintosh powerpc updates for 6.10 2024-05-17 09:05:46 -07:00
mailbox
mcb
md Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
media I2C core removes an argument from the i2c_mux_add_adapter() call to 2024-05-20 08:55:18 -07:00
memory ARM development updates for v6.10-rc1 2024-05-17 08:53:47 -07:00
memstick memstick: rtsx_usb_ms: Convert to platform remove callback returning void 2024-04-25 11:58:52 +02:00
message SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
mfd
misc Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
mmc MMC core: 2024-05-16 08:56:49 -07:00
most
mtd * MTD 2024-05-16 09:04:52 -07:00
mux mux: remove usage of the deprecated ida_simple_xx() API 2024-04-29 08:20:07 -07:00
net dma-mapping updates for Linux 6.10 2024-05-20 10:23:39 -07:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-04-25 12:41:37 -07:00
ntb
nubus
nvdimm nvdimm/btt: always set max_integrity_segments 2024-04-25 12:37:12 -07:00
nvme for-6.10/block-20240511 2024-05-13 13:03:54 -07:00
nvmem
of I2C core removes an argument from the i2c_mux_add_adapter() call to 2024-05-20 08:55:18 -07:00
opp
parisc change alloc_pages name in dma_map_ops to avoid name conflicts 2024-04-25 20:55:53 -07:00
parport
pci pci-v6.9-fixes-2 2024-05-08 09:37:58 -07:00
pcmcia
peci
perf ARM: 2024-05-15 14:46:43 -07:00
phy Merge tag 'drm-msm-next-2024-05-07' of https://gitlab.freedesktop.org/drm/msm into drm-next 2024-05-10 10:22:59 +10:00
pinctrl Pin control changes for the v6.10 kernel cycle: 2024-05-20 08:51:53 -07:00
platform The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
pmdomain pmdomain: Merge branch fixes into next 2024-05-03 15:48:21 +02:00
pnp
power I2C core removes an argument from the i2c_mux_add_adapter() call to 2024-05-20 08:55:18 -07:00
powercap powercap: intel_rapl_tpmi: Enable PMU support 2024-04-30 21:10:37 +02:00
pps pps: remove usage of the deprecated ida_simple_xx() API 2024-04-29 08:20:06 -07:00
ps3
ptp Networking changes for 6.10. 2024-05-14 19:42:24 -07:00
pwm pwm: pca9685: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-10 07:30:27 +02:00
rapidio rapidio: remove choice for enumeration 2024-05-14 23:36:19 +09:00
ras
regulator regulator: Updates for v6.10 2024-05-14 14:36:09 -07:00
remoteproc
reset I'm actually surprised this time. There aren't any new Qualcomm SoC clk 2024-05-18 12:48:37 -07:00
rpmsg
rtc
s390 Networking changes for 6.10. 2024-05-14 19:42:24 -07:00
sbus
scsi The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
sh
siox
slimbus slimbus: qcom-ngd-ctrl: Add timeout for wait operation 2024-05-03 07:30:32 +02:00
soc spi: Updates for v6.10 2024-05-14 14:41:01 -07:00
soundwire
spi spi: Updates for v6.10 2024-05-14 14:41:01 -07:00
spmi
ssb
staging The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
target SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
tc
tee TEE driver for Trusted Services 2024-04-29 22:29:44 +02:00
thermal ACPI updates for 6.10-rc1 2024-05-14 13:31:24 -07:00
thunderbolt
tty kgdb patches for 6.10 2024-05-19 12:01:00 -07:00
ufs SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
uio
usb SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
vdpa
vfio VFIO updates for v6.10-rc1 2024-05-20 14:56:50 -07:00
vhost
video asm-generic cleanups for 6.10 2024-05-20 15:18:34 -07:00
virt The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
virtio The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
w1
watchdog watchdog: LENOVO_SE10_WDT should depend on X86 && DMI 2024-05-11 11:32:06 +02:00
xen dma-mapping updates for Linux 6.10 2024-05-20 10:23:39 -07:00
zorro zorro: Use helpers from ioport.h 2024-04-29 16:45:53 +02:00
Kconfig
Makefile kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2024-05-10 04:34:52 +09:00