Previously, ports were only enabled on S5->S3, not S3->S0. Seems like
they should always get re-enabled on resume.
This also consolidates the USB code into a single file, cleans up the
debug output, and prints the current USB charge state when the
usbchargemode command is run without args.
BUG=chrome-os-partner:12904
BRANCH=link
TEST=manual
- Boot system
- At ec console, 'usb' should print port 0 and 1 are in mode 1.
- At a root shell, 'ectool chargemode 0 0'
- At a root shell, 'ectool chargemode 1 0'
- Suspend system
- At ec console, 'usb' should print port are in mode 0.
- Resume system
- At ec console, 'usb' should print port 0 and 1 are in mode 1.
Change-Id: I3875a104338fb64db503929a018b8577d6f970e4
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/34062
Reviewed-by: Vic Yang <victoryang@chromium.org>