From: Anton Vorontsov Date: Thu, 18 Jun 2009 23:49:01 +0000 (-0700) Subject: spi_mpc83xx: add small delay after asserting chip-select line X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5afbf098d171664695db2a7e828e8d96871a01e1;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git spi_mpc83xx: add small delay after asserting chip-select line This is needed for some underlaying GPIO controllers that may be a bit slow, or if chip-select signal need some time to stabilize. For what it's worth, we already have the similar delay for chip-select de-assertion case. Signed-off-by: Anton Vorontsov Cc: Kumar Gala Cc: David Brownell Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c index 4988230a7e0c..6e0232e65a38 100644 --- a/drivers/spi/spi_mpc83xx.c +++ b/drivers/spi/spi_mpc83xx.c @@ -383,8 +383,10 @@ static void mpc83xx_spi_work(struct work_struct *work) break; } - if (cs_change) + if (cs_change) { mpc83xx_spi_chipselect(spi, BITBANG_CS_ACTIVE); + ndelay(nsecs); + } cs_change = t->cs_change; if (t->len) status = mpc83xx_spi_bufs(spi, t);