diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-06-18 16:21:33 (GMT) |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2015-07-25 09:22:55 (GMT) |
commit | 9ecce9707b05189a762fc87c8483408d175774df (patch) | |
tree | 1d2b0be22f89fc26397d157822764f94547b944d /arch/arm/cpu/armv7/sunxi/usb_phy.c | |
parent | 56a2085410d507c00d4bc374f9af10816638df24 (diff) | |
download | u-boot-9ecce9707b05189a762fc87c8483408d175774df.tar.xz |
sunxi: musb: Stop treating not having a vbus-det gpio as an error
On some boards the otg is wired up in host-only mode in this case we
have no vbus-det gpio.
Stop logging an error from sunxi_usb_phy_vbus_detect() in this case, and
stop treating sunxi_usb_phy_vbus_detect() returning a negative errno, as
if a charger is plugged into the otg port.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'arch/arm/cpu/armv7/sunxi/usb_phy.c')
-rw-r--r-- | arch/arm/cpu/armv7/sunxi/usb_phy.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm/cpu/armv7/sunxi/usb_phy.c b/arch/arm/cpu/armv7/sunxi/usb_phy.c index 5e82ddc..4d63a74 100644 --- a/arch/arm/cpu/armv7/sunxi/usb_phy.c +++ b/arch/arm/cpu/armv7/sunxi/usb_phy.c @@ -237,10 +237,8 @@ int sunxi_usb_phy_vbus_detect(int index) struct sunxi_usb_phy *phy = &sunxi_usb_phy[index]; int err, retries = 3; - if (phy->gpio_vbus_det < 0) { - eprintf("Error: invalid vbus detection pin\n"); + if (phy->gpio_vbus_det < 0) return phy->gpio_vbus_det; - } err = gpio_get_value(phy->gpio_vbus_det); /* |