devlink: Take care of FWNODE_FLAG_NOT_DEVICE in case of DT overlays
Status from this message: Nack.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | driver core: Clear FWNODE_FLAG_NOT_DEVICE when a device is addeddrivers/ | +1 | 2 replies | |
| 2/2 | of: property: fw_devlink: Fix links to supplier when created from phandlesdrivers/ | +15 | 7 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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