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 <avoront...@ru.mvista.com>
---
 drivers/spi/spi_mpc83xx.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
index 08b49d2..d378d5e 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);
-- 
1.6.2.2


------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to