Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Sa, Nuno" <Nuno.Sa@analog.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	linux-iio <linux-iio@vger.kernel.org>,
	"Hennerich, Michael" <Michael.Hennerich@analog.com>,
	Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH] iio: ad5770r: make devicetree property reading consistent
Date: Sat, 14 Aug 2021 17:04:02 +0100	[thread overview]
Message-ID: <20210814170204.387bf394@jic23-huawei> (raw)
In-Reply-To: <PH0PR03MB63665918437E96CAF35B7CD799FA9@PH0PR03MB6366.namprd03.prod.outlook.com>

On Fri, 13 Aug 2021 10:05:17 +0000
"Sa, Nuno" <Nuno.Sa@analog.com> wrote:

> > -----Original Message-----
> > From: Andy Shevchenko <andy.shevchenko@gmail.com>
> > Sent: Friday, August 13, 2021 10:05 AM
> > To: Sa, Nuno <Nuno.Sa@analog.com>
> > Cc: Rob Herring <robh+dt@kernel.org>; linux-iio <linux-  
> > iio@vger.kernel.org>; Jonathan Cameron <jic23@kernel.org>;  
> > Hennerich, Michael <Michael.Hennerich@analog.com>; Lars-Peter
> > Clausen <lars@metafoo.de>
> > Subject: Re: [PATCH] iio: ad5770r: make devicetree property reading
> > consistent
> > 
> > On Fri, Aug 13, 2021 at 10:47 AM Sa, Nuno <Nuno.Sa@analog.com>
> > wrote:  
> > > > From: Rob Herring <robh+dt@kernel.org>
> > > > Sent: Thursday, August 12, 2021 5:11 PM
> > > > On Thu, Aug 12, 2021 at 3:14 AM Sa, Nuno <Nuno.Sa@analog.com>
> > > > wrote:  
> > 
> > ...
> >   
> > > > > Could you give your input on this one?  
> > > >
> > > > There's no context, but I'm assuming this is in channel nodes. Keep  
> > >
> > > Sorry about that. Your assumption is correct, the binding is for a  
> > channel  
> > > node [1]. The driver just get's it as 'num' [2] which is not consistent.
> > > Naively, I just though changing the driver to use reg would be  
> > enough  
> > > but Andy nicely raised the question of someone being already relying
> > > on 'num'...
> > >  
> > > > 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.
> > > >  
> > >
> > > So I guess the solution here is just to change the driver to support  
> > both  
> > > reg and num.  
> > 
> > As far as I got Rob's answer, if the binding never had the 'num',
> > dropping it from the driver is what we want now (actually your
> > original patch) and users, who are 'too much clever' :-) should have
> > had run validation for their DTs before production.
> > 
> > Taking this into account, I'm fine with the patch (but update a commit
> > message to summarize this discussion)
> > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> >   
> 
> You're right... 
> Jonathan, do you want a v2 with an updated commit message?

Please do. Also please add a fixes tag given we are treating it
as a fix.  If we discover someone is using the num variant then
we'll just have to support both values as a fix to the fix.
Not ideal, but as observed, hopefully people are validating the
DTs (which basically means no one is using this in production or
it would have been pointed out before).

Jonathan


> 
> - Nuno Sá


  reply	other threads:[~2021-08-14 16:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11  7:48 [PATCH] iio: ad5770r: make devicetree property reading consistent Nuno Sá
2021-08-11 16:04 ` Andy Shevchenko
2021-08-12  6:55   ` Sa, Nuno
     [not found]     ` <CAHp75VeZLKN0C_+PopKfYtPMqEzGLd4paSKYnrHr1B2Y1Nk9=w@mail.gmail.com>
2021-08-12  8:14       ` Sa, Nuno
2021-08-12 15:10         ` Rob Herring
2021-08-13  7:47           ` Sa, Nuno
2021-08-13  8:04             ` Andy Shevchenko
2021-08-13 10:05               ` Sa, Nuno
2021-08-14 16:04                 ` Jonathan Cameron [this message]
2021-08-16  7:54                   ` Sa, Nuno
2021-08-16  8:10                     ` Andy Shevchenko
2021-08-16  9:58                       ` Sa, Nuno
2021-08-16 12:19                     ` Rob Herring
2021-08-16 13:03                       ` Sa, Nuno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210814170204.387bf394@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=Nuno.Sa@analog.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox