]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
regulator: lm363x: Use generic DT property name for external control pins
authorMilo Kim <milo.kim@ti.com>
Tue, 28 Feb 2017 07:50:41 +0000 (16:50 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 7 Mar 2017 13:59:22 +0000 (14:59 +0100)
Vpos and Vneg LDOs can be enabled or disabled by external GPIOs.
Use general DT property 'enable-gpios' for this usage.
Two enable pins are differentiable by selecting the index number.

Signed-off-by: Milo Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/lm363x-regulator.c

index f53e63301a2054d7a822f5017a8e9a2d7d5a35b4..ce5f7d9ad475f420c88a731ec9e1c44378a17c44 100644 (file)
@@ -227,9 +227,9 @@ static int lm363x_regulator_of_get_enable_gpio(struct device_node *np, int id)
         */
        switch (id) {
        case LM3632_LDO_POS:
-               return of_get_named_gpio(np, "ti,lcm-en1-gpio", 0);
+               return of_get_named_gpio(np, "enable-gpios", 0);
        case LM3632_LDO_NEG:
-               return of_get_named_gpio(np, "ti,lcm-en2-gpio", 0);
+               return of_get_named_gpio(np, "enable-gpios", 1);
        default:
                return -EINVAL;
        }