Skip to content

gpio: don't compare raw GPIO descriptor pointers directly

Bartosz Golaszewski linux-gpio lkml 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected] change-id 20250402-gpiod-is-equal-4e28bb8ab842

Versions newest first

  1. v1 Latest2 patches 6 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2gpio: provide gpiod_is_equal()drivers/gpio/gpiolib.c include/linux/gpio/consumer.h+23 -03 replies
2/2regulator: don't compare raw GPIO descriptor pointersdrivers/regulator/core.c+1 -10 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchMark Brown
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] gpio: don't compare raw GPIO descriptor pointers directly

Handling of shared GPIOs in the kernel needs some improvements. Let's start with a simple change of not comparing GPIO descriptor pointers directly as there's nothing that guarantees that the same physical pin will always be represented by a single GPIO descriptor obtained by calling gpiod_get().

For merging: I suggest to take patch 1/2 through the GPIO tree and provide an immutable tag for the regulator tree.

---
Bartosz Golaszewski (2):
gpio: provide gpiod_is_equal()
regulator: don't compare raw GPIO descriptor pointers

 drivers/gpio/gpiolib.c        | 14 ++++++++++++++
 drivers/regulator/core.c      |  2 +-
 include/linux/gpio/consumer.h |  9 +++++++++
 3 files changed, 24 insertions(+), 1 deletion(-)

---
base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
change-id: 20250402-gpiod-is-equal-4e28bb8ab842

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>