phy: sun4i-usb: Support VBUS detection via power supply
authorSamuel Holland <samuel@sholland.org>
Sun, 12 Sep 2021 14:22:42 +0000 (09:22 -0500)
committerAndre Przywara <andre.przywara@arm.com>
Mon, 25 Oct 2021 13:49:28 +0000 (14:49 +0100)
commit6fa41cdd19b93b27483f071f96da8b66bebd7a37
treefc2c4247911e1867af35ca49a0cb4ecb932175df
parent1da7b88cade196434b84e701c1dadcd3b37c97bc
phy: sun4i-usb: Support VBUS detection via power supply

The device tree binding provides for getting VBUS state from a device
referenced by phandle, as an optional alternative to using a GPIO. In
U-Boot, where there is no power supply class, this VBUS detection will
be implemented using a regulator device and its get_enable method.
Let's hook this up to the PHY driver.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
drivers/phy/allwinner/Kconfig
drivers/phy/allwinner/phy-sun4i-usb.c