Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9503b508 authored by Milo Kim's avatar Milo Kim Committed by Mark Brown
Browse files

regulator: lm363x: Use generic DT property name for external control pins



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: default avatarMilo Kim <milo.kim@ti.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c1ae3cfa
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -227,9 +227,9 @@ static int lm363x_regulator_of_get_enable_gpio(struct device_node *np, int id)
	 */
	 */
	switch (id) {
	switch (id) {
	case LM3632_LDO_POS:
	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:
	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:
	default:
		return -EINVAL;
		return -EINVAL;
	}
	}