aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/lp8788-ldo.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/lp8788-ldo.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/lp8788-ldo.c')
-rw-r--r--drivers/regulator/lp8788-ldo.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/regulator/lp8788-ldo.c b/drivers/regulator/lp8788-ldo.c
index f2347474a106..553b4790050f 100644
--- a/drivers/regulator/lp8788-ldo.c
+++ b/drivers/regulator/lp8788-ldo.c
@@ -503,9 +503,10 @@ static int lp8788_config_ldo_enable_mode(struct platform_device *pdev,
/* FIXME: check default mode for GPIO here: high or low? */
ldo->ena_gpiod = devm_gpiod_get_index_optional(&pdev->dev,
- "enable",
- enable_id,
- GPIOD_OUT_HIGH);
+ "enable",
+ enable_id,
+ GPIOD_OUT_HIGH |
+ GPIOD_FLAGS_BIT_NONEXCLUSIVE);
if (IS_ERR(ldo->ena_gpiod))
return PTR_ERR(ldo->ena_gpiod);