sunxi: Remove misleading USB-OTG charger message
authorAndre Przywara <andre.przywara@arm.com>
Tue, 2 Nov 2021 19:45:47 +0000 (19:45 +0000)
committerAndre Przywara <andre.przywara@arm.com>
Wed, 8 Dec 2021 23:07:15 +0000 (23:07 +0000)
commitfbd9207e7fe3712b372ca9889a2a82402161fd27
treec8757eb5ff74c48de9802e48474555da08535145
parente32dad292ae1422eba1403964918eed220061769
sunxi: Remove misleading USB-OTG charger message

The sunxi MUSB glue driver has some code to check for external VBUS
presence when it's going to use the MUSB host mode, and it warns if
there is VBUS provided through the cable (in sunxi_musb_enable()).

This code was apparently copied to the USB gadget detection code
(g_dnl_board_usb_cable_connected()), but here we actually *expect*
external VBUS power, so a warning is wrong and confusing.
So far this message rarely triggered, but a recent patch (6fa41cdd19b9)
changed this:
===========================
=> ums 0 mmc 2
UMS: LUN 0, dev mmc 2, hwpart 0, sector 0x0, count 0xe90000
A charger is plugged into the OTG
/A charger is plugged into the OTG
\A charger is plugged into the OTG
|A charger is plugged into the OTG
-A charger is plugged into the OTG
....
===========================

Remove the message for the gadget cable detection call, and just return
the status of the VBUS detection, as this is what the callers are after.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
board/sunxi/board.c