diff mbox series

[v2,2/7] of: property: fw_devlink: Report unsupported supplier linking

Message ID 20260910-fw-devlink-nexus-ready-v2-2-17ac82dbe226@toradex.com
State Superseded
Headers show
Series of: property: Make fw_devlink follow GPIO, PWM and clock nexus maps | expand

Commit Message

Ernest Van Hoecke Sept. 10, 2026, 2:16 p.m. UTC
From: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>

OF supplier linking is deliberately disabled on OLPC and Intel CE4100
systems. The add_links operation currently returns zero on these systems,
so callers cannot distinguish unsupported linking from success.

Return -EOPNOTSUPP when supplier linking is unsupported. This allows OF
unit tests to skip link assertions on these systems without exposing the
private platform-support predicate.

The driver core ignores the add_links return value and marks the fwnode
as processed regardless, so its link creation and retry behavior remain
unchanged.

Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
---
 drivers/of/property.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Herve Codina Sept. 16, 2026, 5:44 p.m. UTC | #1
Hi Ernest,

On Thu, 10 Sep 2026 16:16:43 +0200
Ernest Van Hoecke <ernestvanhoecke@gmail.com> wrote:

> From: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
> 
> OF supplier linking is deliberately disabled on OLPC and Intel CE4100
> systems. The add_links operation currently returns zero on these systems,
> so callers cannot distinguish unsupported linking from success.
> 
> Return -EOPNOTSUPP when supplier linking is unsupported. This allows OF
> unit tests to skip link assertions on these systems without exposing the
> private platform-support predicate.
> 
> The driver core ignores the add_links return value and marks the fwnode
> as processed regardless, so its link creation and retry behavior remain
> unchanged.
> 
> Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
> ---
>  drivers/of/property.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Herve Codina <herve.codina@bootlin.com>

Best regards,
Hervé
diff mbox series

Patch

diff --git a/drivers/of/property.c b/drivers/of/property.c
index 380df0861ab9..eba7e9fe6c38 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1691,7 +1691,7 @@  static int of_fwnode_add_links(struct fwnode_handle *fwnode)
 	struct device_node *con_np = to_of_node(fwnode);
 
 	if (!of_is_fwnode_add_links_supported())
-		return 0;
+		return -EOPNOTSUPP;
 
 	if (!con_np)
 		return -EINVAL;