]> git.dujemihanovic.xyz Git - u-boot.git/commit
usb: ehci: mxs: Use regulator_set_enable_if_allowed()
authorFabio Estevam <festevam@denx.de>
Mon, 9 Oct 2023 13:15:35 +0000 (10:15 -0300)
committerStefano Babic <sbabic@denx.de>
Mon, 16 Oct 2023 06:46:01 +0000 (08:46 +0200)
commit7478c84f3d9f84b4fa748dae222d78c9a12e25f7
treefc5ed40521af92b8f3a2dc8198e31f105f0eb555
parent2bcfae22d9f61a57f9cb8f2eb0aff79259e2c724
usb: ehci: mxs: Use regulator_set_enable_if_allowed()

Since commit 4fcba5d556b4 ("regulator: implement basic reference
counter") the return value of regulator_set_enable() may be EALREADY or
EBUSY for fixed/GPIO regulators.

Switch to using the more relaxed regulator_set_enable_if_allowed() to
continue if regulator already was enabled or disabled.

This fixes the following error when running the 'ums' command:

=> ums 0 mmc 0
UMS: LUN 0, dev mmc 0, hwpart 0, sector 0x0, count 0xece000
Error enabling VBUS supply
g_dnl_register: failed!, error: -114
g_dnl_register failed

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
drivers/usb/host/ehci-mxs.c