diff options
author | Mark Brown <broonie@kernel.org> | 2018-06-07 16:10:56 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-06-07 16:23:08 +0300 |
commit | e536700ef5bf9788af185bf890a52f296d055ed7 (patch) | |
tree | 09eb6373a71e194036e2b773b3ece710bda24864 /include/linux/regulator | |
parent | 2b6c00c157c5bf80417f6b814f1088da2dc588ee (diff) | |
download | linux-e536700ef5bf9788af185bf890a52f296d055ed7.tar.xz |
regulator: gpio: Revert
regulator: fixed/gpio: Revert GPIO descriptor changes due to platform breakage
Commit 6059577cb28 "regulator: fixed: Convert to use GPIO descriptor
only" broke at least the ams-delta platform since the lookup tables
added to the board files use the function name "enable" while the driver
uses NULL causing the regulator to not acquire and control the enable
GPIOs. Revert that and a couple of other commits that are caught up
with it to fix the issue:
2b6c00c157c5bf80 "ARM: pxa, regulator: fix building ezx e680"
6059577cb28d8b15 "regulator: fixed: Convert to use GPIO descriptor only"
37bed97f00734ce3 "regulator: gpio: Get enable GPIO using GPIO descriptor"
Reported-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r-- | include/linux/regulator/fixed.h | 3 | ||||
-rw-r--r-- | include/linux/regulator/gpio-regulator.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/regulator/fixed.h b/include/linux/regulator/fixed.h index 1a4340ed8e2b..48918be649d4 100644 --- a/include/linux/regulator/fixed.h +++ b/include/linux/regulator/fixed.h @@ -24,6 +24,8 @@ struct regulator_init_data; * @supply_name: Name of the regulator supply * @input_supply: Name of the input regulator supply * @microvolts: Output voltage of regulator + * @gpio: GPIO to use for enable control + * set to -EINVAL if not used * @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 @@ -47,6 +49,7 @@ struct fixed_voltage_config { const char *supply_name; const char *input_supply; int microvolts; + int gpio; unsigned startup_delay; unsigned gpio_is_open_drain:1; unsigned enable_high:1; diff --git a/include/linux/regulator/gpio-regulator.h b/include/linux/regulator/gpio-regulator.h index 536cab86f2d5..19fbd267406d 100644 --- a/include/linux/regulator/gpio-regulator.h +++ b/include/linux/regulator/gpio-regulator.h @@ -44,6 +44,8 @@ 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 @@ -67,6 +69,7 @@ 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; |