aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/lm363x-regulator.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-10-15 11:02:40 +0200
committerMark Brown <broonie@kernel.org>2018-10-15 10:48:59 +0100
commit63239e4bf7eff394d2bcba95999d6e3eae2be6a6 (patch)
tree8ed6cf3aaf31a9a053c8b2151e9bfbcde6a5a965 /drivers/regulator/lm363x-regulator.c
parentregulator/gpio: Allow nonexclusive GPIO access (diff)
downloadlinux-dev-63239e4bf7eff394d2bcba95999d6e3eae2be6a6.tar.xz
linux-dev-63239e4bf7eff394d2bcba95999d6e3eae2be6a6.zip
regulator: Fetch enable gpiods nonexclusive
Since the core regulator code is treating GPIO descriptors as nonexclusive, i.e. it assumes that the enable GPIO line may be shared with several regulators, let's add the flag introduced for fixing this problem on fixed regulators to all drivers fetching GPIO descriptors to avoid possible regressions. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/lm363x-regulator.c')
-rw-r--r--drivers/regulator/lm363x-regulator.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/regulator/lm363x-regulator.c b/drivers/regulator/lm363x-regulator.c
index b615a413ca9f..bbedb08d257b 100644
--- a/drivers/regulator/lm363x-regulator.c
+++ b/drivers/regulator/lm363x-regulator.c
@@ -227,9 +227,11 @@ static struct gpio_desc *lm363x_regulator_of_get_enable_gpio(struct device *dev,
*/
switch (id) {
case LM3632_LDO_POS:
- return devm_gpiod_get_index_optional(dev, "enable", 0, GPIOD_OUT_LOW);
+ return devm_gpiod_get_index_optional(dev, "enable", 0,
+ GPIOD_OUT_LOW | GPIOD_FLAGS_BIT_NONEXCLUSIVE);
case LM3632_LDO_NEG:
- return devm_gpiod_get_index_optional(dev, "enable", 1, GPIOD_OUT_LOW);
+ return devm_gpiod_get_index_optional(dev, "enable", 1,
+ GPIOD_OUT_LOW | GPIOD_FLAGS_BIT_NONEXCLUSIVE);
default:
return NULL;
}