Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy-sun4i-usb: Only check vbus-det on power-on on boards with vbus-det

data->vbus_det is always 1 on boards without a (working) vbus-det, skip
the vbus_det test on such boards.

This fixes the sun4i usb phy code never turning on Vbus on such boards.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Hans de Goede and committed by
Kishon Vijay Abraham I
8083526e 3d772c4a

+2 -1
+2 -1
drivers/phy/phy-sun4i-usb.c
··· 328 328 return 0; 329 329 330 330 /* For phy0 only turn on Vbus if we don't have an ext. Vbus */ 331 - if (phy->index == 0 && data->vbus_det) 331 + if (phy->index == 0 && sun4i_usb_phy0_have_vbus_det(data) && 332 + data->vbus_det) 332 333 return 0; 333 334 334 335 ret = regulator_enable(phy->vbus);