Re: [PATCH 2/2] iio:adc:ad7124: Convert to fwnode handling of child node parsing.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 27, 2021 at 4:52 PM Jonathan Cameron
<Jonathan.Cameron@xxxxxxxxxx> wrote:
> On Sun, 25 Jul 2021 23:33:12 +0300
> Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:
> > On Sun, Jul 25, 2021 at 8:22 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:

...

> > > -       for_each_available_child_of_node(np, child) {
> > > +       device_for_each_child_node(dev, child) {
> >
> > Isn't this
> >   fwnode_for_each_available_child_node()
> > better to use?
>
> Given we would be extracting the fwnode just to call this
> loop, I'd say no, device version makes more sense..
>
> >
> > ...
> >
> > So the gaps I see are
> >   device_get_available_child_node_count()
> > and
> >   device_for_each_available_child_node()
>
> Do we then fix the fact that
> device_for_each_child_node() will call the _available() form
> for device tree?  That seems inconsistent currently and
> I was assuming that was deliberate...

I'm not sure I got your point. Mine (see below) is to add the APIs
that you want to use as a direct replacement of the corresponding OF
counterparts.

> > Both of them I think are easy to add and avoid possible breakage.


-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux