]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mfd: cros_ec: spi: Calculate delay between transfers correctly
authorDavid Hendricks <dhendrix@chromium.org>
Wed, 30 Apr 2014 17:44:04 +0000 (10:44 -0700)
committerLee Jones <lee.jones@linaro.org>
Tue, 27 May 2014 10:25:19 +0000 (11:25 +0100)
commit3acd71814399eee6dc7a1b6bd21866bbc83de738
treef697f6a6d370c54eadbf42ddaf43da256bcdc1e3
parent85d202e79b42d11776bce579538c34610faed291
mfd: cros_ec: spi: Calculate delay between transfers correctly

To avoid spamming the EC we calculate the time between the previous
transfer and the current transfer and force a delay if the time delta
is too small.

However, a small miscalculation causes the delay period to be
far too short. Most noticably this impacts commands with a long
turnaround time such as EC firmware reads and writes.

Signed-off-by: David Hendricks <dhendrix@chromium.org>
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