Re: [PATCH] iio: ad5770r: make devicetree property reading consistent

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

 



On Thu, Aug 12, 2021 at 3:14 AM Sa, Nuno <Nuno.Sa@xxxxxxxxxx> wrote:
>
>
>
> > -----Original Message-----
> > From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
> > Sent: Thursday, August 12, 2021 9:06 AM
> > To: Sa, Nuno <Nuno.Sa@xxxxxxxxxx>
> > Cc: linux-iio <linux-iio@xxxxxxxxxxxxxxx>; Jonathan Cameron
> > <jic23@xxxxxxxxxx>; Hennerich, Michael
> > <Michael.Hennerich@xxxxxxxxxx>; Lars-Peter Clausen
> > <lars@xxxxxxxxxx>
> > Subject: Re: [PATCH] iio: ad5770r: make devicetree property reading
> > consistent
> >
> >
> >
> > On Thursday, August 12, 2021, Sa, Nuno <Nuno.Sa@xxxxxxxxxx
> > <mailto:Nuno.Sa@xxxxxxxxxx> > wrote:
> >
> >
> >       > From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx
> > <mailto:andy.shevchenko@xxxxxxxxx> >
> >       > Sent: Wednesday, August 11, 2021 6:04 PM
> >       > To: Sa, Nuno <Nuno.Sa@xxxxxxxxxx
> > <mailto:Nuno.Sa@xxxxxxxxxx> >
> >       > Cc: linux-iio <linux-iio@xxxxxxxxxxxxxxx <mailto:linux-
> > iio@xxxxxxxxxxxxxxx> >; Jonathan Cameron
> >       > <jic23@xxxxxxxxxx <mailto:jic23@xxxxxxxxxx> >; Hennerich,
> > Michael
> >       > <Michael.Hennerich@xxxxxxxxxx
> > <mailto:Michael.Hennerich@xxxxxxxxxx> >; Lars-Peter Clausen
> >       > <lars@xxxxxxxxxx <mailto:lars@xxxxxxxxxx> >
> >       > Subject: Re: [PATCH] iio: ad5770r: make devicetree property
> > reading
> >       > consistent
> >       >
> >       > On Wed, Aug 11, 2021 at 10:46 AM Nuno Sá
> > <nuno.sa@xxxxxxxxxx <mailto:nuno.sa@xxxxxxxxxx> >
> >       > wrote:
> >       > >
> >       > > The bindings file for this driver is defining the property as
> > 'reg' but
> >       > > the driver was reading it with the 'num' name. This patches
> > makes
> >       > the
> >       >
> >       > "This patches makes the..." --> "Make the..."
> >       >
> >       > > driver consistent with what is defined in the bindings.
> >       >
> >       > While it seems okay, it may be now a chicken-egg issue
> > (somebody
> >       > created a DT with "num" property).
> >       >
> >
> >       Arghh, I see. Well, maybe let's go the other way around and
> > change the
> >       bindings doc to 'num'?
> >
> >
> > Not sure, like I said it’s a chicken-egg issue. Consult with Rob perhaps?
>
> Hi Rob,
>
> Could you give your input on this one?

There's no context, but I'm assuming this is in channel nodes. Keep
the binding 'reg' and make the driver support both if needed.
Considering the author of the binding also changed the binding from
num to reg shortly after adding the binding, I don't think 'num'
support is needed. If someone used 'num' and didn't run validation,
well, that's their problem.

Rob




[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