From: Doug Anderson Date: Thu, 18 Sep 2014 15:18:54 +0000 (+0200) Subject: mfd: cros_ec: Delay for 50ms when we see EC_CMD_REBOOT_EC X-Git-Tag: fixes-against-v3.18-rc2~69^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=659e142be09482cfd8b9017f616afebc7cf48fa3;p=pandora-kernel.git 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: Doug Anderson Reviewed-by: Randall Spangler Reviewed-by: Vadim Bendebury Signed-off-by: Javier Martinez Canillas Signed-off-by: Lee Jones --- Reading git-diff-tree failed