OSDN Git Service

mfd: cros ec: spi: Simplify delay handling between SPI messages
authorJon Hunter <jonathanh@nvidia.com>
Tue, 14 Nov 2017 14:43:28 +0000 (14:43 +0000)
committerLee Jones <lee.jones@linaro.org>
Mon, 8 Jan 2018 11:03:34 +0000 (11:03 +0000)
commitd501ff903bdd735b215bded10958d8f794ca0339
treef1a7188a67697fab4407df5915ae168d08651d1c
parent572ff4d560be3784205b224cd67d6715620092d7
mfd: cros ec: spi: Simplify delay handling between SPI messages

The EC SPI driver prevents SPI transfers being to rapidly by keeping
track of the time the last transfer was issued via the
'last_transfer_ns' variable. Previously, if the 'last_transfer_ns'
variable was zero, this indicated that no previous transfer had been
sent and that no delay was needed. However, the EC SPI driver has
been updated to always initialise the 'last_transfer_ns' variable
during probe and therefore, it is no longer necessary to test if it
is zero. Remove the code that checks if this variable is zero.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/cros_ec_spi.c