]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: of: Support SPI nonstandard GPIO properties
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 27 Dec 2017 15:37:44 +0000 (16:37 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 8 Jan 2018 16:29:25 +0000 (17:29 +0100)
commit6a004d388f5dcb29bde72cc5f3ea3c9207df55be
treef55b031e90ed59b7939d40f7a898103de043ab4d
parent95bf02d054b1233c7d309471ca152a457199ff8f
gpio: of: Support SPI nonstandard GPIO properties

Before it was clearly established that all GPIO properties in the
device tree shall be named "foo-gpios" (with the deprecated variant
"foo-gpio" for single lines) we unfortunately merged a few bindings
which named the lines "gpio-foo" instead.

This is most prominent in the GPIO SPI driver in Linux which names
the lines "gpio-sck", "gpio-mosi" and "gpio-miso".

As we want to switch the GPIO SPI driver to using descriptors, we
need devm_gpiod_get() to return something reasonable when looking
up these in the device tree.

Put in a special #ifdef:ed kludge to do this special lookup only
for the SPI case and gets compiled out if we're not enabling SPI.
If we have more oddly defined legacy GPIOs like this, they can be
handled in a similar manner.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-of.c