]> git.baikalelectronics.ru Git - uboot.git/commit
regulator: fix: enable gpio when requested
authorMark Kettenis <kettenis@openbsd.org>
Mon, 27 Apr 2020 09:09:47 +0000 (11:09 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 15 Jun 2020 20:37:01 +0000 (16:37 -0400)
commit2f7f6f41a352266ecb1584014474a270c386a4af
tree154f1aeb54e7aab20b14cbd11e0cfa19f68b1e93
parent402138b2661bf76b8fcadc24596e78c0f26c69ee
regulator: fix: enable gpio when requested

The fix in commit 5fb88f39a65a has the side-effect that the regulator
will be disabled when requesting the relevant gpio in
regulator_common_ofdata_to_platdata() and enabled in
regulator_pre_probe() when the regulator was already enabled.
This leads to a short interruption in the 3.3V power to the PCIe
slot on the firefly-rk3399 which makes an ADATA SX8000NP NVMe SSD
unhappy.

Fix this by setting the GPIOD_IS_OUT_ACTIVE flag again when the
'regulator-boot-on' property is set, but check for this property
explicitly instead of relying on the "boot_on" member of
the uclass platdata.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Tested-by: Patrice Chotard <patrice.chotard@st.com>
drivers/power/regulator/regulator-uclass.c
drivers/power/regulator/regulator_common.c