devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] devlink: Take care of FWNODE_FLAG_NOT_DEVICE in case of DT overlays
@ 2024-02-20 11:10 Herve Codina
  2024-02-20 11:10 ` [PATCH 1/2] driver core: Clear FWNODE_FLAG_NOT_DEVICE when a device is added Herve Codina
  2024-02-20 11:10 ` [PATCH 2/2] of: property: fw_devlink: Fix links to supplier when created from phandles Herve Codina
  0 siblings, 2 replies; 12+ messages in thread
From: Herve Codina @ 2024-02-20 11:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki, Rob Herring, Frank Rowand,
	Shawn Guo, Saravana Kannan, Wolfram Sang, Mark Brown
  Cc: Geert Uytterhoeven, Rob Herring, linux-kernel, devicetree,
	Luca Ceresoli, Thomas Petazzoni, Herve Codina

Since commit 1a50d9403fb9 ("treewide: Fix probing of devices in DT
overlays"), the FWNODE_FLAG_NOT_DEVICE is set on nodes present in the
overlay. Having this flag set leads to some wrong devlink links.
For instance, some links can be created with a supplier set to a parent
device instead of the device itself.

This series clears the FWNODE_FLAG_NOT_DEVICE in some specific location
to fix the wrong links issues.
- device_add()
  When a device is added, the related fwnode (if any) is populated as
  a struct device. It makes sense to clear the flag at that point and so
  avoid differences between DT used with or without overlays.
- of_link_phandle()
  If the supplier device has a compatible string and 'is available', a
  device is going to be created soon to handle this node. In that case,
  to avoid a link created using the supplier parent device instead of
  the device itself, clearing the FWNODE_FLAG_NOT_DEVICE makes sense.

Best regards,
Hervé Codina

Herve Codina (2):
  driver core: Clear FWNODE_FLAG_NOT_DEVICE when a device is added
  of: property: fw_devlink: Fix links to supplier when created from
    phandles

 drivers/base/core.c   |  1 +
 drivers/of/property.c | 16 +++++++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

-- 
2.43.0


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

end of thread, other threads:[~2024-04-08 23:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-20 11:10 [PATCH 0/2] devlink: Take care of FWNODE_FLAG_NOT_DEVICE in case of DT overlays Herve Codina
2024-02-20 11:10 ` [PATCH 1/2] driver core: Clear FWNODE_FLAG_NOT_DEVICE when a device is added Herve Codina
2024-02-21  2:41   ` Saravana Kannan
2024-03-12 14:18     ` Herve Codina
2024-02-20 11:10 ` [PATCH 2/2] of: property: fw_devlink: Fix links to supplier when created from phandles Herve Codina
2024-02-21  2:40   ` Saravana Kannan
2024-02-21  8:51     ` Herve Codina
2024-03-05  7:14       ` Saravana Kannan
2024-03-21 11:59         ` Herve Codina
2024-03-23  2:00           ` Saravana Kannan
2024-04-08 14:40             ` Herve Codina
2024-04-08 23:17               ` Saravana Kannan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).