Re: [PATCH v2 8/8] iio: adc: ti-ads112c14: add measurement channel support
From: Jonathan Cameron
Date: Thu Jul 02 2026 - 15:11:19 EST
On Thu, 2 Jul 2026 09:18:41 -0500
David Lechner <dlechner@xxxxxxxxxxxx> wrote:
> On 7/2/26 4:18 AM, Andy Shevchenko wrote:
> > On Wed, Jul 01, 2026 at 09:20:19PM +0100, Jonathan Cameron wrote:
> >> On Thu, 25 Jun 2026 16:55:10 -0500
> >> "David Lechner (TI)" <dlechner@xxxxxxxxxxxx> wrote:
> >
> > ...
> >
> >>> + device_for_each_named_child_node_scoped(dev, child, "channel") {
> >>> + struct ads112c14_measurement *measurement = &data->measurements[i];
> >>> + struct iio_chan_spec *spec = &channels[i];
> >
> >>> + if (!fwnode_device_is_available(child))
> >>> + continue;
> >
> > Also drop this dup check.
> >
>
> How is this duplicate? device_for_each_named_child_node_scoped()
> doesn't check this.
It is convoluted to show but it does (now)...
Ultimately for dt case it calls
of_get_next_status_child(node, prev, __of_device_is_available);
IIRC that didn't used to the be the case and we had iterators
for available and not available both for DT they always meant
available and more recently it got cleaned up as the number
of places that need to pass non available nodes is tiny!
Jonathan