diff options
| author | Linus Walleij <[email protected]> | 2019-01-29 11:31:53 +0100 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2019-02-06 15:58:29 +0000 |
| commit | 01dc79cd6fe7d25b0eba84009634f5435cbdb4e6 (patch) | |
| tree | 75ff17690ab5a26bbed8114c780cab2afc8a4782 /include/linux | |
| parent | d6cd33ad71029a3f77ba1686caf55d4dea58d916 (diff) | |
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 <[email protected]> # i.MX boards user
Cc: Haojian Zhuang <[email protected]> # MMP2 maintainer
Cc: Aaro Koskinen <[email protected]> # OMAP1 maintainer
Cc: Tony Lindgren <[email protected]> # OMAP1,2,3 maintainer
Cc: Mike Rapoport <[email protected]> # EM-X270 maintainer
Cc: Robert Jarzmik <[email protected]> # EZX maintainer
Cc: Philipp Zabel <[email protected]> # Magician maintainer
Cc: Petr Cvek <[email protected]> # Magician
Cc: Robert Jarzmik <[email protected]> # PXA
Cc: Paul Parsons <[email protected]> # hx4700
Cc: Daniel Mack <[email protected]> # Raumfeld maintainer
Cc: Marc Zyngier <[email protected]> # Zeus maintainer
Cc: Geert Uytterhoeven <[email protected]> # SuperH pinctrl/GPIO maintainer
Cc: Russell King <[email protected]> # SA1100
Tested-by: Marek Szyprowski <[email protected]>
Tested-by: Janusz Krzysztofik <[email protected]> #OMAP1 Amstrad Delta
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/regulator/fixed.h | 10 | ||||
| -rw-r--r-- | include/linux/regulator/gpio-regulator.h | 6 |
2 files changed, 0 insertions, 16 deletions
diff --git a/include/linux/regulator/fixed.h b/include/linux/regulator/fixed.h index 1a4340ed8e2b..f10140da7145 100644 --- a/include/linux/regulator/fixed.h +++ b/include/linux/regulator/fixed.h @@ -25,14 +25,6 @@ struct regulator_init_data; * @input_supply: Name of the input regulator supply * @microvolts: Output voltage of regulator * @startup_delay: Start-up time in microseconds - * @gpio_is_open_drain: Gpio pin is open drain or normal type. - * If it is open drain type then HIGH will be set - * through PULL-UP with setting gpio as input - * and low will be set as gpio-output with driven - * to low. For non-open-drain case, the gpio will - * will be in output and drive to low/high accordingly. - * @enable_high: Polarity of enable GPIO - * 1 = Active high, 0 = Active low * @enabled_at_boot: Whether regulator has been enabled at * boot or not. 1 = Yes, 0 = No * This is used to keep the regulator at @@ -48,8 +40,6 @@ struct fixed_voltage_config { const char *input_supply; int microvolts; unsigned startup_delay; - unsigned gpio_is_open_drain:1; - unsigned enable_high:1; unsigned enabled_at_boot:1; struct regulator_init_data *init_data; }; diff --git a/include/linux/regulator/gpio-regulator.h b/include/linux/regulator/gpio-regulator.h index 49c407afb944..11cd6375215d 100644 --- a/include/linux/regulator/gpio-regulator.h +++ b/include/linux/regulator/gpio-regulator.h @@ -46,10 +46,6 @@ struct gpio_regulator_state { /** * struct gpio_regulator_config - config structure * @supply_name: Name of the regulator supply - * @enable_gpio: GPIO to use for enable control - * set to -EINVAL if not used - * @enable_high: Polarity of enable GPIO - * 1 = Active high, 0 = Active low * @enabled_at_boot: Whether regulator has been enabled at * boot or not. 1 = Yes, 0 = No * This is used to keep the regulator at @@ -71,8 +67,6 @@ struct gpio_regulator_state { struct gpio_regulator_config { const char *supply_name; - int enable_gpio; - unsigned enable_high:1; unsigned enabled_at_boot:1; unsigned startup_delay; |