From: "Danilo Krummrich" <dakr@kernel.org>
To: "Bartosz Golaszewski" <brgl@kernel.org>
Cc: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Daniel Scally" <djrscally@gmail.com>,
"Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
"Sakari Ailus" <sakari.ailus@linux.intel.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Mika Westerberg" <mika.westerberg@linux.intel.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Linus Walleij" <linusw@kernel.org>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Len Brown" <lenb@kernel.org>,
linux-acpi@vger.kernel.org, driver-core@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
platform-driver-x86@vger.kernel.org,
"Bartosz Golaszewski" <bartosz.golaszewski@oss.qualcomm.com>
Subject: Re: [PATCH v4 1/2] software node: return -ENOTCONN when referenced swnode is not registered yet
Date: Wed, 08 Apr 2026 20:53:02 +0200 [thread overview]
Message-ID: <DHO01A7B9M0Y.1QVVS8600WRJ5@kernel.org> (raw)
In-Reply-To: <CAMRc=MchUSdWo=BXrYN-qS3YFer2R3J02HyJxKJje-a1QvWdfg@mail.gmail.com>
On Wed Apr 8, 2026 at 5:52 PM CEST, Bartosz Golaszewski wrote:
> On Wed, 8 Apr 2026 17:28:46 +0200, Danilo Krummrich <dakr@kernel.org> said:
>> 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?
>>
>
> Yes, sure. It can be something like:
>
> %-ENOTCONN when the remote firmware node exists but has not been
> registered yet.
>
> Does this sound good and doo you want me to resend or can you change it
> when applying?
I can change it when applying.
One additional question though. I think it should be fine, but are we sure the
change can't regress other subsystems? It seems some of them (e.g. sfp-bus,
v4l2, iio) special case -ENOENT.
next prev parent reply other threads:[~2026-04-08 18:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 13:27 [PATCH v4 0/2] driver core: make references to unregistered software nodes a special case Bartosz Golaszewski
2026-04-07 13:27 ` [PATCH v4 1/2] software node: return -ENOTCONN when referenced swnode is not registered yet Bartosz Golaszewski
2026-04-08 7:19 ` Bartosz Golaszewski
2026-04-08 15:28 ` Danilo Krummrich
2026-04-08 15:52 ` Bartosz Golaszewski
2026-04-08 18:53 ` Danilo Krummrich [this message]
2026-04-08 19:06 ` Andy Shevchenko
2026-04-07 13:27 ` [PATCH v4 2/2] gpio: swnode: defer probe on references to unregistered software nodes Bartosz Golaszewski
2026-04-07 14:33 ` Andy Shevchenko
2026-04-07 14:39 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DHO01A7B9M0Y.1QVVS8600WRJ5@kernel.org \
--to=dakr@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy@kernel.org \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=djrscally@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox