Re: [PATCH v1 1/1] device property: Allow secondary lookup in fwnode_get_next_child_node()

From: Sakari Ailus

Date: Wed Feb 11 2026 - 03:27:21 EST


Hi Andy,

On Wed, Feb 11, 2026 at 10:14:59AM +0200, Andy Shevchenko wrote:
> On Wed, Feb 11, 2026 at 12:02:57AM +0200, Sakari Ailus wrote:
> > On Tue, Feb 10, 2026 at 02:58:22PM +0100, Andy Shevchenko wrote:
> > > When device_get_child_node_count() got split to the fwnode and device
> > > respective APIs, the fwnode didn't inherit the ability to traverse over
> > > the secondary fwnode. Hence any user, that switches from device to fwnode
> > > API misses this feature. In particular, this was revealed by the commit
> > > 1490cbb9dbfd ("device property: Split fwnode_get_child_node_count()")
> > > that effectively broke the GPIO enumeration on Intel Galileo boards.
> > > Fix this by moving the secondary lookup from device to fwnode API.
> > >
> > > Note, in general no device_*() API should go into the depth of the fwnode
> > > implementation.
>
> Thanks for the review, my answers below.
>
> ...
>
> > > + if (IS_ERR_OR_NULL(fwnode))
> > > + return NULL;
> >
> > This test is already being done by fwnode_call_ptr_op() (via
> > fwnode_has_op()) so I'd omit it here. That would probably be best put in
> > another patch though. Up to you.
>
> I would like to keep this as is for the matter of backporting.
> With that done, I can clean up further.
>
> ...
>
> > As the function becomes trivial, I'd move it to property.h.
>
> Yes, but the same applies to many functions in the property.c. I don't want to
> treat this specially:
> - exceptionally for this function (what about the rest?)
> - for the matters of backporting

There are other similar functions in property.h already. Moving the other
trivial ones there, too, wouldn't hurt.

>
> ...
>
> TL;DR: I would like to move this patch forward as is. After that I will
> consider cleaning up as suggested taking into account other places.

Sounds good to me.

Reviewed-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>

--
Kind regards,

Sakari Ailus