mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] gpio: shared: use device_is_compatible() for reset-gpio
@ 2026-01-12  9:36 Bartosz Golaszewski
  2026-01-12 10:21 ` Linus Walleij
  2026-01-13 10:16 ` Bartosz Golaszewski
  0 siblings, 2 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2026-01-12  9:36 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Philipp Zabel
  Cc: linux-kernel, linux-gpio, Bartosz Golaszewski

reset-gpio devices now can be identified with device_is_compatible() so
use it instead of checking the device name string.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
 drivers/gpio/gpiolib-shared.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c
index 076d8642675c..c97229c90c91 100644
--- a/drivers/gpio/gpiolib-shared.c
+++ b/drivers/gpio/gpiolib-shared.c
@@ -451,12 +451,7 @@ int gpio_shared_add_proxy_lookup(struct device *consumer, const char *con_id,
 		list_for_each_entry(ref, &entry->refs, list) {
 			guard(mutex)(&ref->lock);
 
-			/*
-			 * FIXME: use device_is_compatible() once the reset-gpio
-			 * drivers gains a compatible string which it currently
-			 * does not have.
-			 */
-			if (!ref->fwnode && strstarts(dev_name(consumer), "reset.gpio.")) {
+			if (!ref->fwnode && device_is_compatible(consumer, "reset-gpio")) {
 				if (!gpio_shared_dev_is_reset_gpio(consumer, entry, ref))
 					continue;
 			} else if (!device_match_fwnode(consumer, ref->fwnode)) {
-- 
2.47.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gpio: shared: use device_is_compatible() for reset-gpio
  2026-01-12  9:36 [PATCH] gpio: shared: use device_is_compatible() for reset-gpio Bartosz Golaszewski
@ 2026-01-12 10:21 ` Linus Walleij
  2026-01-13 10:16 ` Bartosz Golaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2026-01-12 10:21 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Bartosz Golaszewski, Philipp Zabel, linux-kernel, linux-gpio

On Mon, Jan 12, 2026 at 10:37 AM Bartosz Golaszewski
<bartosz.golaszewski@oss.qualcomm.com> wrote:

> reset-gpio devices now can be identified with device_is_compatible() so
> use it instead of checking the device name string.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gpio: shared: use device_is_compatible() for reset-gpio
  2026-01-12  9:36 [PATCH] gpio: shared: use device_is_compatible() for reset-gpio Bartosz Golaszewski
  2026-01-12 10:21 ` Linus Walleij
@ 2026-01-13 10:16 ` Bartosz Golaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2026-01-13 10:16 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Philipp Zabel, Bartosz Golaszewski
  Cc: linux-kernel, linux-gpio


On Mon, 12 Jan 2026 10:36:51 +0100, Bartosz Golaszewski wrote:
> reset-gpio devices now can be identified with device_is_compatible() so
> use it instead of checking the device name string.
> 
> 

Applied, thanks!

[1/1] gpio: shared: use device_is_compatible() for reset-gpio
      commit: 568ea51e61f7da72ee290d24d6ee952586a3e168

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-13 10:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-12  9:36 [PATCH] gpio: shared: use device_is_compatible() for reset-gpio Bartosz Golaszewski
2026-01-12 10:21 ` Linus Walleij
2026-01-13 10:16 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®