]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: gpio: Honor regulator-boot-on property
authorChen-Yu Tsai <wens@csie.org>
Mon, 20 Jul 2020 13:28:09 +0000 (21:28 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 20 Jul 2020 15:31:54 +0000 (16:31 +0100)
commit49a6f0d770db3990a881877804812cab86badd5c
tree74c27d021b304ccab63c87dd1110bdf506cc0ebc
parent277fdba277d8f20520742fbe3ab891c1b51d6c37
regulator: gpio: Honor regulator-boot-on property

When requesting the enable GPIO, the driver should do so with the
correct output level matching some expected state. This is especially
important if the regulator is a critical one, such as a supply for
the boot CPU. This is currently done by checking for the enable-at-boot
property, but this is not documented in the device tree binding, nor
does it match the common regulator properties.

Honor the common regulator-boot-on property by checking the boot_on
constraint setting within the DT probe path. This is the same as what
is done in the fixed regulator driver.

Also add a comment stating that the enable-at-boot property should not
be used.

Fixes: 7db61c80a6c5 ("regulator: gpio-regulator: Allow use of GPIO controlled regulators though DT")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20200720132809.26908-1-wens@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/gpio-regulator.c