diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-06-18 18:21:33 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2015-07-25 11:22:55 +0200 |
commit | 9ecce9707b05189a762fc87c8483408d175774df (patch) | |
tree | 1d2b0be22f89fc26397d157822764f94547b944d /drivers/usb/musb-new/sunxi.c | |
parent | 56a2085410d507c00d4bc374f9af10816638df24 (diff) |
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 'drivers/usb/musb-new/sunxi.c')
-rw-r--r-- | drivers/usb/musb-new/sunxi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c index 3542326238..3a29b18e5f 100644 --- a/drivers/usb/musb-new/sunxi.c +++ b/drivers/usb/musb-new/sunxi.c @@ -208,7 +208,7 @@ static int sunxi_musb_enable(struct musb *musb) if (is_host_enabled(musb)) { ret = sunxi_usb_phy_vbus_detect(0); - if (ret) { + if (ret == 1) { printf("A charger is plugged into the OTG: "); return -ENODEV; } |