[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ffa5ae6d-a925-41da-9826-4bb376ca0fbe@gmail.com>
Date: Fri, 21 Mar 2025 08:35:06 +0200
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
Paul Elder <paul.elder@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: i2c: thp7312: Don't require node availability
Hi dee Ho Laurent,
On 20/03/2025 16:26, Laurent Pinchart wrote:
> Hi Matti,
>
> On Thu, Mar 20, 2025 at 10:35:35AM +0200, Matti Vaittinen wrote:
>> It appears that the concept of available firmware nodes is not really
>> applicable to the scenarios where a specific name is required from a
>> node.
>>
>> As explained[1] by Sakari:
>> "OF only enumerates available nodes via the fwnode API, software nodes
>> don't have the concept but on ACPI I guess you could have a difference
>> in nodes where you have device sub-nodes that aren't available. Still,
>> these ACPI device nodes don't have meaningful names in this context
>> (they're 4-character object names) so you wouldn't use them like this
>> anyway."
>>
>> Use the fwnode_for_each_child_node() instead of the
>> fwnode_for_each_available_child_node() In order to make it clearly
>> visible that the 'availability' of the nodes does not need to be
>> considered here.
>
> Why not ? Node availability is a concept that exists in DT, and this
> driver has only been tested on DT-based systems.
I admit I need to study this then. I just took what Sakari said for
granted, without taking any further look at this.
I mean following quote:
"OF only enumerates available nodes via the fwnode API".
I interpreted it as if, in the dt based systems, the nodes which aren't
available, wouldn't be enumerated and available via the fwnode APIs. If
this is not true, then we probably need to re-re-re-consider also the
need for the fwnode_for_each_available_named_child_node().
> Why can't we keep the
> code as-is ?
If I am mistaken and the 'availability' has a meaning - then we can and
should. If not, then this discussion should serve as a good example why
the code should be changed ;)
I hope Sakari can share his view :)
Yours,
-- Matti
Powered by blists - more mailing lists