OSDN Git Service

regulator: fixed/gpio: Pull inversion/OD into gpiolib
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 29 Jan 2019 10:31:53 +0000 (11:31 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 6 Feb 2019 15:58:29 +0000 (15:58 +0000)
commit01dc79cd6fe7d25b0eba84009634f5435cbdb4e6
tree75ff17690ab5a26bbed8114c780cab2afc8a4782
parentd6cd33ad71029a3f77ba1686caf55d4dea58d916
regulator: fixed/gpio: Pull inversion/OD into gpiolib

This pushes the handling of inversion semantics and open drain
settings to the GPIO descriptor and gpiolib. All affected board
files are also augmented.

This is especially nice since we don't have to have any
confusing flags passed around to the left and right littering
the fixed and GPIO regulator drivers and the regulator core.
It is all just very straight-forward: the core asks the GPIO
line to be asserted or deasserted and gpiolib deals with the
rest depending on how the platform is configured: if the line
is active low, it deals with that, if the line is open drain,
it deals with that too.

Cc: Alexander Shiyan <shc_work@mail.ru> # i.MX boards user
Cc: Haojian Zhuang <haojian.zhuang@gmail.com> # MMP2 maintainer
Cc: Aaro Koskinen <aaro.koskinen@iki.fi> # OMAP1 maintainer
Cc: Tony Lindgren <tony@atomide.com> # OMAP1,2,3 maintainer
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> # EM-X270 maintainer
Cc: Robert Jarzmik <robert.jarzmik@free.fr> # EZX maintainer
Cc: Philipp Zabel <philipp.zabel@gmail.com> # Magician maintainer
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: Daniel Mack <zonque@gmail.com> # Raumfeld maintainer
Cc: Marc Zyngier <marc.zyngier@arm.com> # Zeus maintainer
Cc: Geert Uytterhoeven <geert+renesas@glider.be> # SuperH pinctrl/GPIO maintainer
Cc: Russell King <rmk+kernel@armlinux.org.uk> # SA1100
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Janusz Krzysztofik <jmkrzyszt@gmail.com> #OMAP1 Amstrad Delta
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
17 files changed:
arch/arm/mach-imx/mach-mx21ads.c
arch/arm/mach-imx/mach-mx27ads.c
arch/arm/mach-mmp/brownstone.c
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap2/pdata-quirks.c
arch/arm/mach-pxa/em-x270.c
arch/arm/mach-pxa/ezx.c
arch/arm/mach-pxa/raumfeld.c
arch/arm/mach-pxa/zeus.c
arch/arm/mach-sa1100/assabet.c
arch/sh/boards/mach-ecovec24/setup.c
arch/x86/platform/intel-mid/device_libs/platform_bcm43xx.c
drivers/regulator/core.c
drivers/regulator/da9055-regulator.c
drivers/regulator/fixed.c
include/linux/regulator/fixed.h
include/linux/regulator/gpio-regulator.h