diff options
author | Mark Brown <broonie@kernel.org> | 2018-05-30 15:15:20 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-05-30 15:17:03 +0100 |
commit | ab4d11e2c2329cf7cb7be31ff22489aae4dee5dc (patch) | |
tree | adf82bf82855955ac9e128952de57ae2c3a9e324 /drivers/mfd | |
parent | d1dae72fab2c377ff463742eefd8ac0f9e99b7b9 (diff) | |
download | linux-stable-ab4d11e2c2329cf7cb7be31ff22489aae4dee5dc.tar.gz linux-stable-ab4d11e2c2329cf7cb7be31ff22489aae4dee5dc.tar.bz2 linux-stable-ab4d11e2c2329cf7cb7be31ff22489aae4dee5dc.zip |
regulator: wm8994: Fix shared GPIOs
This reverts commit 3c6b38d45fa51c7c51 "regulator: wm8994: Pass
descriptor instead of GPIO number" as it has problems with shared
GPIOs similar to that on s2mps11.
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/wm8994-core.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index c409464231f6..953d0790ffd5 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c @@ -21,6 +21,7 @@ #include <linux/mfd/core.h> #include <linux/of.h> #include <linux/of_device.h> +#include <linux/of_gpio.h> #include <linux/pm_runtime.h> #include <linux/regmap.h> #include <linux/regulator/consumer.h> @@ -301,6 +302,14 @@ static int wm8994_set_pdata_from_of(struct wm8994 *wm8994) if (of_find_property(np, "wlf,ldoena-always-driven", NULL)) pdata->lineout2fb = true; + pdata->ldo[0].enable = of_get_named_gpio(np, "wlf,ldo1ena", 0); + if (pdata->ldo[0].enable < 0) + pdata->ldo[0].enable = 0; + + pdata->ldo[1].enable = of_get_named_gpio(np, "wlf,ldo2ena", 0); + if (pdata->ldo[1].enable < 0) + pdata->ldo[1].enable = 0; + return 0; } #else |