Re: [PATCH v4 3/5] iio: adc: mp2629: Add support for mp2629 ADC driver

Andy Shevchenko
2020-03-28T18:50:39Z

On Sat, Mar 28, 2020 at 4:42 PM Jonathan Cameron <jic23@kernel.org> wrote:
> On Mon, 23 Mar 2020 01:32:34 +0200
> Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> > On Mon, Mar 23, 2020 at 12:47 AM Saravanan Sekar <sravanhome@gmail.com> wrote:

...

> > > + indio_dev->dev.of_node = pdev->dev.of_node;
> >
> > Jonathan, doesn't IIO core do this for all?
> >
>
> Nope. I'm not totally sure it's always safe to do so
> as we have some weird parent structures in some cases.
> A quick grep suggests that we may be fine though, or
> alternatively be able to get away with a set it if not
> already set approach.
>
> I'll take a look when I get some time. It would be nice
> to clean this up.

We may follow the GPIO subsystem's approach, i.e. if there is no node
provided take the one from the supplied struct device.
But it may have side effects. So, it's completely up to you.

--
With Best Regards,
Andy Shevchenko