From owner-svn-src-head@freebsd.org Tue Dec 13 10:03:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5710AC708DD; Tue, 13 Dec 2016 10:03:30 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25F3D785; Tue, 13 Dec 2016 10:03:30 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBDA3TXR049840; Tue, 13 Dec 2016 10:03:29 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBDA3T3Z049839; Tue, 13 Dec 2016 10:03:29 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201612131003.uBDA3T3Z049839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Tue, 13 Dec 2016 10:03:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310018 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 10:03:30 -0000 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 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); } }