sunxi: usbc: Initialize vusb value on request_resources
authorHans de Goede <hdegoede@redhat.com>
Fri, 27 Mar 2015 20:57:54 +0000 (21:57 +0100)
committerHans de Goede <hdegoede@redhat.com>
Wed, 15 Apr 2015 14:17:17 +0000 (16:17 +0200)
commit046ea8b390f9c8986f52e4bd2c7bffabd4749330
tree22dc5cb6e241393f83271c8b1010dcbd5d050be0
parent940382fe7d61d90326e42fe00b976c65b18befa2
sunxi: usbc: Initialize vusb value on request_resources

On boards which use the pmic to enable/disable vbus on the otg port, the
vbus value is not reset to 0 on reset, as reset only resets the SoC and not
the pmic, so explicitly set vbus to 0 on init (request_resources) by moving
the gpio_direction_output call into request_resources.

For consistency also move the gpio_direction_input call for vbus-detect into
request_resources.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
arch/arm/cpu/armv7/sunxi/usbc.c