]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpio: shared: handle pins shared by child nodes of devices
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Wed, 18 Mar 2026 14:00:54 +0000 (15:00 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Mon, 23 Mar 2026 08:54:24 +0000 (09:54 +0100)
commitec42a3a90ae9ae64b16d01a2e5d32ec0865ca8cf
treec808d0974a5db95ae3e0955b61e802ab13474b7b
parent710abda58055ed5eaa8958107633cc12a365c328
gpio: shared: handle pins shared by child nodes of devices

Shared GPIOs may be assigned to child nodes of device nodes which don't
themselves bind to any struct device. We need to pass the firmware node
that is the actual consumer to gpiolib-shared and compare against it
instead of unconditionally using the fwnode of the consumer device.

Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support")
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Closes: https://lore.kernel.org/all/921ba8ce-b18e-4a99-966d-c763d22081e2@nvidia.com/
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://patch.msgid.link/20260318-gpio-shared-xlate-v2-2-0ce34c707e81@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpiolib-shared.c
drivers/gpio/gpiolib-shared.h
drivers/gpio/gpiolib.c