Re: [PATCH v4 1/2] software node: return -ENOTCONN when referenced swnode is not registered yet

Danilo Krummrich
2026-04-08T15:28:52Z

On Wed Apr 8, 2026 at 9:19 AM CEST, Bartosz Golaszewski wrote:
> On Tue, Apr 7, 2026 at 3:28 PM Bartosz Golaszewski
> <bartosz.golaszewski@oss.qualcomm.com> wrote:
>>
>> It's possible that at the time of resolving a reference to a remote
>> software node, the node we know exists is not yet registered as a full
>> firmware node. We currently return -ENOENT in this case but the same
>> error code is also returned in some other cases, like the reference
>> property with given name not existing in the property list of the local
>> software node.
>>
>> It makes sense to let users know that we're dealing with an unregistered
>> software node so that they can defer probe - the situation is somewhat
>> similar to there existing a firmware node to which no device is bound
>> yet - which is valid grounds for probe deferral. To that end: use
>> -ENOTCONN to indicate the software node is "not connected".
>>
>> Acked-by: Andy Shevchenko <andy@kernel.org>
>> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
>> ---
>
> Hi Danilo!
>
> With Andy's Ack, do you think you could still queue this for v7.1?

Yeah, that should work, but I have a question about the patch.

The comment added to fwnode_property_get_reference_args() says:

+ * %-ENOTCONN when the remote firmware node is a software node that
+ * has not been registered as a firmware node yet

This seems like a bit of a layering violation to me, as it makes it explicit
that this error code indicates a software node, while
fwnode_property_get_reference_args() itself should be agnostic.

The caller can easily derive more specific semantics with an is_software_node()
check as you already do in the GPIO code.

Can we describe the same condition, but without explicitly naming the backend?