]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mfd: cros_ec: spi: Make the cros_ec_spi timeout more reliable
authorDoug Anderson <dianders@chromium.org>
Wed, 30 Apr 2014 17:44:06 +0000 (10:44 -0700)
committerLee Jones <lee.jones@linaro.org>
Tue, 27 May 2014 10:25:25 +0000 (11:25 +0100)
commit5e23cc669e68465d0c4de704a29144a2ca06c6da
tree81672291cec32c3aa692baf5b8c83f6b66d82027
parent86772fc336687639c57c37d161f72fc07c2c222a
mfd: cros_ec: spi: Make the cros_ec_spi timeout more reliable

The cros_ec_spi transfer had two problems with its timeout code:

1. It looked at the timeout even in the case that it found valid data.
2. If the cros_ec_spi code got switched out for a while, it's possible
   it could get a timeout after a single loop.  Let's be paranoid and
   make sure we do one last transfer after the timeout expires.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/cros_ec_spi.c