mfd: cros_ec: spi: Add delay for asserting CS
authorAlexandru M Stan <amstan@chromium.org>
Tue, 9 Jun 2015 11:04:49 +0000 (13:04 +0200)
committerLee Jones <lee.jones@linaro.org>
Mon, 15 Jun 2015 12:18:24 +0000 (13:18 +0100)
commitff4378f4b813d5aa26bbf814a9060638dab1fbbf
treec905a8f1116c051c51a48dabc347585632815332
parentf44c21ff6d2dc76957ddbf26fdf442ee5a9cf3c0
mfd: cros_ec: spi: Add delay for asserting CS

Some ECs need a little time for waking up before they can accept
SPI data at a high speed. This is configurable via a DT property
"google,cros-ec-spi-pre-delay".

This patch makes the cros_ec_spi driver to cause a delay before
the beginning of a SPI transaction, to make sure that the EC has
already woken up, if the property has been defined in the DTS.

Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/cros_ec_spi.c