Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 659e142b authored by Doug Anderson's avatar Doug Anderson Committed by Lee Jones
Browse files

mfd: cros_ec: Delay for 50ms when we see EC_CMD_REBOOT_EC



If someone sends a EC_CMD_REBOOT_EC to the EC, the EC will likely be
unresponsive for quite a while.  Add a delay to the end of the command
to prevent random failures of future commands.

NOTES:
* This could be optimized a bit by simply delaying the next command
  sent, but EC_CMD_REBOOT_EC is such a rare command that the extra
  complexity doesn't seem worth it.
* This is a bit of an "ugly hack" since the SPI driver is effectively
  snooping on the communication and making a lot of assumptions.  It
  would be nice to architect in some better solution long term.
* This same logic probably needs to be applied to the i2c driver.

Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
Reviewed-by: default avatarRandall Spangler <rspangler@chromium.org>
Reviewed-by: default avatarVadim Bendebury <vbendeb@chromium.org>
Signed-off-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 48b490d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment