Re: [PATCH/RFC 1/3] dt-bindings: i2c: i2c-gpio: Add support for named gpios

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

 




On Mon, Sep 18, 2017 at 2:45 PM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> On Mon, Sep 18, 2017 at 6:52 PM, Rob Herring <robh@xxxxxxxxxx> wrote:
>
>> In theory yes, but reality is pretty much everyone follows it. There's
>> no other way to specify active high vs. low for example. Furthermore,
>> if someone wanted to do flags in their own custom way, that would
>> still work. It is still the controller (or GPIO core) that interprets
>> the flags, not the client.
>>
>> This is a new binding, so only new DT will have it and we can apply
>> new standards.
>
> I'd like to get a picture of any one-cell GPIO DTS:es and/or drivers
> still around.

$ git grep '#gpio-cells.*1'
Documentation/devicetree/bindings/gpio/gpio.txt:
#gpio-cells = <1>;
Documentation/devicetree/bindings/gpio/spear_spics.txt:  *
#gpio-cells: should be 1 and will mention chip select number
Documentation/devicetree/bindings/interrupt-controller/interrupts.txt:
                 #gpio-cells = <1>;
Documentation/devicetree/bindings/mfd/twl6040.txt:- #gpio-cells = <1>:
twl6040 provides GPO lines.
arch/mips/boot/dts/xilfpga/nexys4ddr.dts:               #gpio-cells = <1>;

...and this one may be out of date. All other instances for Xilinx
gpio use 2 cells.

We also have to look for custom translate functions of which there are
a handful, but they all use standard flags.

>
> I would like to deal with them somehow.

Looks like we already warn in the kernel if <2. Might be worth adding
this to dtc, then I can get the warning without booting a kernel on
platforms I don't have.

> When we started the big DT migration this was one of the areas
> we made some screwups in, admittedly, but someone just has to
> go first, and that was incidentally GPIO controllers.

The move to standardize flags started before the Great ARM Conversion,
so I would have expected some old PPC DTs. But it looks like we are
good.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux