public inbox for linux-gpio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] driver core: provide and use device_match_fwnode_ext()
@ 2026-02-23 15:40 Bartosz Golaszewski
  2026-02-23 15:40 ` [PATCH v2 1/2] driver core: make fwnode_is_primary() public Bartosz Golaszewski
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Bartosz Golaszewski @ 2026-02-23 15:40 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich,
	Linus Walleij, Bartosz Golaszewski, Dmitry Torokhov,
	Andy Shevchenko, Daniel Scally, Heikki Krogerus, Sakari Ailus,
	Len Brown
  Cc: driver-core, linux-kernel, linux-gpio, brgl, linux-acpi,
	Bartosz Golaszewski

In GPIOLIB, during fwnode lookup, after having resolved the consumer's
reference to a specific fwnode, we only match it against the primary
node of the controllers. Let's extend that to also the secondary node by
exposing fwnode_is_primary() to drivers and reworking
gpio_chip_match_by_fwnode().

Link: https://lore.kernel.org/all/aZUIFiOYt6GOlDQx@google.com/
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
Changes in v2:
- Fold the code initially put into driver code into GPIOLIB as advised
  by Rafael
- Rework the logic as suggested by Andy
- To that end: make fwnode_is_primary() public
- Link to v1: https://patch.msgid.link/20260219-device-match-secondary-fwnode-v1-0-a64e8d4754bc@oss.qualcomm.com

---
Bartosz Golaszewski (2):
      driver core: make fwnode_is_primary() public
      gpiolib: match secondary fwnode too in gpio_device_find_by_fwnode()

 drivers/base/core.c    |  5 -----
 drivers/gpio/gpiolib.c | 12 +++++++++++-
 include/linux/fwnode.h |  5 +++++
 3 files changed, 16 insertions(+), 6 deletions(-)
---
base-commit: 50f68cc7be0a2cbf54d8f6aaf17df32fb01acc3f
change-id: 20260219-device-match-secondary-fwnode-4cc163ec47ee

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


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

end of thread, other threads:[~2026-02-25 10:08 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23 15:40 [PATCH v2 0/2] driver core: provide and use device_match_fwnode_ext() Bartosz Golaszewski
2026-02-23 15:40 ` [PATCH v2 1/2] driver core: make fwnode_is_primary() public Bartosz Golaszewski
2026-02-23 15:42   ` Rafael J. Wysocki
2026-02-23 17:53   ` Dmitry Torokhov
2026-02-23 17:54   ` Andy Shevchenko
2026-02-23 18:28     ` Bartosz Golaszewski
2026-02-23 18:49       ` Rafael J. Wysocki
2026-02-23 19:32       ` Andy Shevchenko
2026-02-23 19:45         ` Rafael J. Wysocki
2026-02-23 20:24           ` Andy Shevchenko
2026-02-23 15:40 ` [PATCH v2 2/2] gpiolib: match secondary fwnode too in gpio_device_find_by_fwnode() Bartosz Golaszewski
2026-02-23 15:43   ` Rafael J. Wysocki
2026-02-23 17:23   ` Sakari Ailus
2026-02-23 17:46     ` Rafael J. Wysocki
2026-02-23 22:07       ` Sakari Ailus
2026-02-24  8:47         ` Bartosz Golaszewski
2026-02-24  8:56           ` Sakari Ailus
2026-02-24  9:43             ` Andy Shevchenko
2026-02-25  7:39               ` Sakari Ailus
2026-02-25  9:38                 ` Andy Shevchenko
2026-02-25 10:07                   ` Heikki Krogerus
2026-02-23 19:45   ` Danilo Krummrich
2026-02-23 19:55     ` Rafael J. Wysocki
2026-02-23 20:00       ` Danilo Krummrich
2026-02-23 20:04         ` Rafael J. Wysocki
2026-02-23 20:46   ` Rafael J. Wysocki
2026-02-23 15:46 ` [PATCH v2 0/2] driver core: provide and use device_match_fwnode_ext() Bartosz Golaszewski
2026-02-23 16:00   ` Rafael J. Wysocki

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