Skip to content

Commit

Permalink
spi_mpc83xx: add small delay after asserting chip-select line
Browse files Browse the repository at this point in the history
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 <avorontsov@ru.mvista.com>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: David Brownell <david-b@pacbell.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Anton Vorontsov authored and Linus Torvalds committed Jun 19, 2009
1 parent fd8a11e commit 5afbf09
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/spi/spi_mpc83xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5afbf09

Please sign in to comment.