Skip to content

devlink: Take care of FWNODE_FLAG_NOT_DEVICE in case of DT overlays

Herve Codina linux-devicetree lkml stable 1 version NAK

Status from this message: Nack.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 9 repliesNAK

Patches in v1

#Subject and filesSizeRepliesApplied
1/2driver core: Clear FWNODE_FLAG_NOT_DEVICE when a device is addeddrivers/base/core.c+1 -02 replies
2/2of: property: fw_devlink: Fix links to supplier when created from phandlesdrivers/of/property.c+15 -17 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] devlink: Take care of FWNODE_FLAG_NOT_DEVICE in case of DT overlays

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(-)
Signature · 1 line
2.43.0