svn commit: r310018 - head/sys/dev/gpio

Michael Zhilin mizhka at FreeBSD.org
Tue Dec 13 10:03:30 UTC 2016


Author: mizhka
Date: Tue Dec 13 10:03:29 2016
New Revision: 310018
URL: https://svnweb.freebsd.org/changeset/base/310018

Log:
  [gpiospi] add clock delay to avoid smashing of bits
  
  Submitted by:	Hiroki Mori <yamori83 at yahoo.co.jp>
  Reviewed by:	loos, ray, mizhka
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D8749

Modified:
  head/sys/dev/gpio/gpiospi.c

Modified: head/sys/dev/gpio/gpiospi.c
==============================================================================
--- head/sys/dev/gpio/gpiospi.c	Tue Dec 13 09:53:43 2016	(r310017)
+++ head/sys/dev/gpio/gpiospi.c	Tue Dec 13 10:03:29 2016	(r310018)
@@ -293,6 +293,7 @@ gpio_spi_txrx(struct gpio_spi_softc *sc,
 			gpio_delay(sc);
 			GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev,
 			    sc->sc_sclk, 1);
+			gpio_delay(sc);
 		} else {
 			/* If mode 0 or 3 */
 
@@ -312,6 +313,7 @@ gpio_spi_txrx(struct gpio_spi_softc *sc,
 			gpio_delay(sc);
 			GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev,
 			    sc->sc_sclk, 0);
+			gpio_delay(sc);
 		}
 	}
 


More information about the svn-src-head mailing list