CHROMIUM: input: mouse - Fix trackpoint re-probe on resume.
authorShawn Nematbakhsh <shawnn@google.com>
Thu, 25 Apr 2013 21:30:04 +0000 (14:30 -0700)
committerChromeBot <chrome-bot@google.com>
Mon, 29 Apr 2013 10:47:57 +0000 (03:47 -0700)
commitf097bc2d8174d4f5161d1e4741a0a5bd5f63d1a3
treec571895b594dc4145b0cc743faf00d71e75a2712
parent3631d956e44fb78c5a6516180ce76a5a49904851
CHROMIUM: input: mouse - Fix trackpoint re-probe on resume.

During suspend, power may be cut to the trackpoint. If so, the
trackpoint will automatically begin its power-on diagnostics upon being
re-powered. If trackpoint_reconnect is called before the diagnostics
complete, the probe ID command will be lost, and reconnect will fail.
This will lead to re-probe, which takes several seconds on Stout due to
the trackpoint / trackpad pass-through design.

The fix here is to make a second attempt if the initial commands on
reconnect fail, which should give the trackpoint enough time to come out
of power-on diagnostics.

TEST=suspend/resume test for 3000 iterations without re-enumeration.
BUG=chromium:220389

Change-Id: I1ff8d3accdde86184864915d540b870ed33feee4
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49228
Reviewed-by: Chung-yih Wang <cywang@chromium.org>
drivers/input/mouse/trackpoint.c