[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1485425392.1113.0.camel@paulk.fr>
Date: Thu, 26 Jan 2017 11:09:52 +0100
From: Paul Kocialkowski <contact@...lk.fr>
To: Peter Rosin <peda@...ntia.se>,
Stephen Warren <swarren@...dotorg.org>
Cc: linux-kernel@...r.kernel.org, Sebastian Reichel <sre@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>, linux-pm@...r.kernel.org,
devicetree@...r.kernel.org, linux-tegra@...r.kernel.org,
Jon Hunter <jonathanh@...dia.com>
Subject: Re: [PATCH v3] dt-bindings: power: supply: bq24735: reverse the
polarity of ac-detect
On 25/01/17 13:20, Peter Rosin wrote:
> On 2017-01-24 17:24, Paul Kocialkowski wrote:
> > Le jeudi 15 décembre 2016 à 18:50 +0100, Peter Rosin a écrit :
> > > The bindings are fine.
> > >
> > > The Tegra dts files are buggy, but the driver is also buggy, so those
> > > two bugs cancel each other. So, the option is to either introduce
> > > regressions by fixing the two bugs thus creating a flag day where
> > > the kernel and dt needs to match. Or, just document what is going on
> > > and change the bindings even if they are not wrong.
> >
> > After reading the discussion, I would rather be in favor of fixing the
> > driver
> > and the tegra dts files, which are both wrong.
> >
> > Keeping things as-is is very counter-intuitive: the GPIO on nyan boards is
> > active-low and should be described as such (think of other projects, like
> > U-Boot, reusing the dts). It's also very counter-intuitive to require that
> > any
> > new board using that driver use active-low polarity in the GPIO declaration
> > when
> > the line is really active-high.
>
> Agreed, it very counter-intuitive. I have a board w/o an invert and it
> does look odd with active-low in the dts. It really should be active-high.
>
> The (new) binding helps a bit though.
Yeah, it's a solution anyway. I'm mostly worried that it means all other code
(especially not in Linux) using the dts will be plagued by this, which seems a
bit unfair. I still see this as an error not being fixed.
> > Is anyone strongly opposed to that solution? I'd really rather see the issue
> > fixed that way instead of the current proposal (this patch).
>
> It's a little bit more than a proposal since it is in linux-next. But not set
> in stone of course.
Oh, I thought it was still up for review when sending my previous message.
> I personally do not care as long as it is changed before
> hitting Linus' tree as I have no deployed devices. But docs are just that.
> Docs. Anything that worked before is going to break with the change you are
> proposing. Are you really willing to break who knows how many tegra boards?
From my perspective, fixing counter-intuitive behaviour justifies that.
But you're probably right to point out that others down the line will most
likely prefer to keep the change you introduced. So I'll put it this way:
if everyone agrees that it's okay to break support for older device-trees,
then I'm available to craft a patch. Otherwise, let's just stick with you
changes you got in.
> Or do you somehow know that *all* tegra users will always update their kernel
> and dtb in sync, so that regressions will not happen?
Frankly I've never understood why kernel maintainers expect this is not the
case, and this is quite frequently a pain when trying to address issues such as
this one. While I reckon that device-trees shouldn't be tied to the kernel in
particular (both are independent), I think it's fair to except that users use
device-trees matching the release date of the kernel.
It's usually accepted that projects have dependencies on certain versions of
libraries and explicitly do not support older versions of these. It would be
nice to adopt the same attitude towards device-tree. These are my 2 cents on the
issue, of course this isn't up for me to decide.
> > I'd also be happy to implement and test that solution on nyans, as I've done
> > other bq24735-related work for nyans recently.
>
> Changing this is trivial. Testing that the change does what it is supposed to
> is not the main obstacle...
Right. Note that I'll be testing your bq24735 patches on nyans soon, so perhaps
I'll have an upcoming series in case I spot any regression.
Cheers!
--
Paul Kocialkowski, developer of free digital technology at the lower levels
Website: https://www.paulk.fr/
Coding blog: https://code.paulk.fr/
Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists