Re: [PATCH] gpio: of: Handle SPI chipselect legacy bindings

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

 



On Wed, Sep 5, 2018 at 1:44 PM Mark Brown <broonie@xxxxxxxxxx> wrote:
> On Wed, Sep 05, 2018 at 09:30:10AM +0200, Geert Uytterhoeven wrote:
>
> > The last two are even more interesting, as they use spi-gpio, so there
> > are 3 flags
> > impacting chip select polarity (gpio-sck cell 2, cs-gpios cell 2,
> > cs-active-high).
> >
> > Looks like the current expectation is that all two (or three) should agree?
>
> I think the current implementation is "intended" to come out as a
> logical or - if anything sets the line active high then it's set active
> high.  I've not checked properly if that's actually the case in practice
> though.  It's not the most beautiful or well thought out arrangement :(

It's an artifact of a bit of confusion and not knowing where to go
in the early days of device tree introduction, not much to do about.
I guess we didn't even agree that GPIO phandles should have flags
at the time.

The idea with this patch (like with the regulator patches) is to
contain the confusion in gpiolib-of.c and try to make the subsystems
just use gpiolib, so the API to gpiolib becomes "narrow and deep"
as the saying goes, taking semantic clutter away from the
subsystem.

Yours,
Linus Walleij



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux