Skip to content
Commit 1da7b88c authored by Samuel Holland's avatar Samuel Holland Committed by Andre Przywara
Browse files

phy: sun4i-usb: Refactor VBUS detection to match Linux



The Linux driver checks the VBUS detection GPIO first; then VBUS power
supply; then finally assumes VBUS is present. When adding VBUS power
supply support, we want to match that order, so we get the same behavior
in case both a GPIO and a power supply are provided in the device tree.

So refactor the function a bit to remove the early return, and use the
same "assume VBUS is present" final fallback.

Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
Acked-by: default avatarAndre Przywara <andre.przywara@arm.com>
Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
parent 6617894b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment