From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D2283D646D; Wed, 8 Apr 2026 15:28:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775662133; cv=none; b=lyBe9UsnTzgoVshoLXElwAH1DthfC+FcbuX1LwHSKAVf/KArFxBhboByizUzHFvo1hR84XUxa/VxcZcaTgq7PiYdmcCGRCFKUhWIqebZF+oEJw49WovDlZ0IQJF5ppTK6NeSlP/NWLnES+FPqCZirp2mpdAO87wXmEScdLcJZi4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775662133; c=relaxed/simple; bh=wCWFT/9q2k5RRPzbWKYbpefTxNcp2EWEDGnOMlT4WrM=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=KB76Zcdr3kk6cg7ApSE8hZS7F4a3uePY8AtjXAyFt1K6TOV8XU6dsmh38OXu2Cp+kgFwIm2mvOu8DHm0dpKTha4f8fphyG55HJnqsRz3PtnmA74Ztp6r4PeM4KiXf79Aas1dTIqjH3mTJYeZYlsMChnS6XDaAZKg+HH+Kb4vWKs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RYiJzEIN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RYiJzEIN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12084C2BC9E; Wed, 8 Apr 2026 15:28:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775662132; bh=wCWFT/9q2k5RRPzbWKYbpefTxNcp2EWEDGnOMlT4WrM=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=RYiJzEINIAUuLwwxzwbKMJ4PoNGjD3lvsGAni07Q4y/U7LcJ0n+2ZwG+XzLAqklkV Psk0SQ+PJnG531WPB4bRI1qvPuFzW563Y4Vd0r47fuwNr3f6MXOZ/yxr01M66MLjdc 8YQSjQCeTXSAb8k6DfELSctyLGCSdnqqOgqoSJogEHm5zezda54Vq6Ymj8rlKcTRlD 8kpXPgxRUXLXc/aC/+v3g4FycB6rwaI6RB2F1lfuIXzIEc9blzElpT5AabyGZ6c23F IV3YNMTyi7ZDwwh2x/gHfpnXC+etMDeQE6RSv8XxqkEYNZ8ZzpTw9ID+B4HOxO+d6Q ifzZXvQsA6/MA== Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 08 Apr 2026 17:28:46 +0200 Message-Id: Subject: Re: [PATCH v4 1/2] software node: return -ENOTCONN when referenced swnode is not registered yet Cc: "Andy Shevchenko" , "Daniel Scally" , "Heikki Krogerus" , "Sakari Ailus" , "Greg Kroah-Hartman" , "Rafael J. Wysocki" , "Mika Westerberg" , "Andy Shevchenko" , "Linus Walleij" , "Hans de Goede" , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , "Dmitry Torokhov" , "Len Brown" , , , , , , "Bartosz Golaszewski" To: "Bartosz Golaszewski" From: "Danilo Krummrich" References: <20260407-swnode-unreg-retcode-v4-0-1b2f0725eb9c@oss.qualcomm.com> <20260407-swnode-unreg-retcode-v4-1-1b2f0725eb9c@oss.qualcomm.com> In-Reply-To: On Wed Apr 8, 2026 at 9:19 AM CEST, Bartosz Golaszewski wrote: > On Tue, Apr 7, 2026 at 3:28=E2=80=AFPM Bartosz Golaszewski > 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 >> Signed-off-by: Bartosz Golaszewski >> --- > > 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 explici= t 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_no= de() check as you already do in the GPIO code. Can we describe the same condition, but without explicitly naming the backe= nd?