regulator: gpio: Convert to use descriptors
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 29 Jan 2019 10:31:52 +0000 (11:31 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 6 Feb 2019 15:58:15 +0000 (15:58 +0000)
commitd6cd33ad71029a3f77ba1686caf55d4dea58d916
treec487971ab5c2bf8709c572b45187339ab29108ce
parent4f297062b288e9434280dd3a2f0ba7424d7a7224
regulator: gpio: Convert to use descriptors

This converts the GPIO regulator driver to use decriptors only.

We have to let go of the array gpio handling: the fetched descriptors
are handled individually anyway, and the array retrieveal function
does not make it possible to retrieve each GPIO descriptor with
unique flags. Instead get them one by one.

We request the "enable" GPIO separately as before, and make sure
that this line is requested as nonexclusive since enable lines can
be shared and the regulator core expects this.

Most users of the GPIO regulator are using device tree.

There are two boards in the kernel using the gpio regulator from a
non-devicetree path: PXA hx4700 and magician. Make sure to switch
these over to use descriptors as well.

Cc: Philipp Zabel <p.zabel@pengutronix.de> # Magician
Cc: Petr Cvek <petr.cvek@tul.cz> # Magician
Cc: Robert Jarzmik <robert.jarzmik@free.fr> # PXA
Cc: Paul Parsons <lost.distance@yahoo.com> # hx4700
Cc: Kevin Hilman <khilman@baylibre.com> # Meson
Cc: Neil Armstrong <narmstrong@baylibre.com> # Meson
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
arch/arm/mach-pxa/hx4700.c
arch/arm/mach-pxa/magician.c
drivers/regulator/gpio-regulator.c
include/linux/regulator/gpio-regulator.h