Skip to content

Commit

Permalink
mfd: cros ec: spi: Increase EC transaction delay
Browse files Browse the repository at this point in the history
50 us is not a long enough delay between EC transactions. At least 70 us
are needed for the 16 MHz STM32L part. Increase the delay to 200 us for
an extra safety margin.

Reviewed-by: Randall Spangler <[email protected]>
Signed-off-by: Derek Basehore <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
  • Loading branch information
dbasehore authored and Lee Jones committed Jan 6, 2014
1 parent 9981a31 commit 49f91ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/mfd/cros_ec_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@
/*
* Time between raising the SPI chip select (for the end of a
* transaction) and dropping it again (for the next transaction).
* If we go too fast, the EC will miss the transaction. It seems
* that 50us is enough with the 16MHz STM32 EC.
* If we go too fast, the EC will miss the transaction. We know that we
* need at least 70 us with the 16 MHz STM32 EC, so go with 200 us to be
* safe.
*/
#define EC_SPI_RECOVERY_TIME_NS (50 * 1000)
#define EC_SPI_RECOVERY_TIME_NS (200 * 1000)

/**
* struct cros_ec_spi - information about a SPI-connected EC
Expand Down

0 comments on commit 49f91ac

Please sign in to comment.