The use of and enablement of the GPIO can be used across devices.
Use the enable_reg in the regulator descriptor for the register to
write.

Signed-off-by: Dan Murphy <dmur...@ti.com>
---

v2 - No changes - https://lore.kernel.org/patchwork/patch/1058777/

 drivers/regulator/lm363x-regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/lm363x-regulator.c 
b/drivers/regulator/lm363x-regulator.c
index c876e161052a..382b1cecdd93 100644
--- a/drivers/regulator/lm363x-regulator.c
+++ b/drivers/regulator/lm363x-regulator.c
@@ -263,8 +263,8 @@ static int lm363x_regulator_probe(struct platform_device 
*pdev)
 
        if (gpiod) {
                cfg.ena_gpiod = gpiod;
-
-               ret = regmap_update_bits(regmap, LM3632_REG_BIAS_CONFIG,
+               ret = regmap_update_bits(regmap,
+                                        lm363x_regulator_desc[id].enable_reg,
                                         LM3632_EXT_EN_MASK,
                                         LM3632_EXT_EN_MASK);
                if (ret) {
-- 
2.21.0.5.gaeb582a983

Reply via email to