[autotest] Set USB state forcefully in servo initialization.

In class Servo, the state of the USB key mux switch is cached
locally after it's set for the first time.  However, the cached
state can become out of date in some pathological cases, most
notably if servod restarts.

This changes Servo.initialize_dut() to reset the cached value every
time.  This guarantees that if the cached state becomes out of date,
it can be re-synchronized by calling the initialize method.

BUG=None
TEST=Tested in conjunction with CL:282766

Change-Id: Ia2fc04272ef6d97f78ee8478be5b99258f555c4a
Reviewed-on: https://chromium-review.googlesource.com/288363
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
1 file changed