Received: by 10.223.164.202 with SMTP id h10csp2432193wrb; Sat, 18 Nov 2017 22:12:33 -0800 (PST) X-Google-Smtp-Source: AGs4zMak+f5DL1tqUS1BNeDESbFtcgD2Z3egHFC73EcDaapYnf8EQyeONUkNALQ+QlQDF8SkcaSL X-Received: by 10.84.210.66 with SMTP id z60mr10315392plh.168.1511071952987; Sat, 18 Nov 2017 22:12:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511071952; cv=none; d=google.com; s=arc-20160816; b=TCvv60HSF6sD8yRaXmVC4h52UwtnEaOC75OVJAsUA/WmUayh7gfciveeCO70MtFC2d j/HK6lSOmLB62M2S+4wxHgGc3IxRN3qAUKoOlH51GCPA59hW0OfA4NdxMuNxN56sHQ6e G9rQ7o7SxccqhyWeiQP6aOvAL+7nAQ/cLdqNJ+bYP2CVdiq5UnrerIkySOOr87mTR838 LGGx+veNPFAUtP5kNZ/0tStoDSdtR6e4j1Cfvy/cn67JmJsRBHHzxjdGMZA8KkCJjm15 LcWZZaJoDUHQc2FI+3WVzETFLoHbalr8Mjur7t/LKV8eYRXP0ipzby2F55FLAJ5wwkYI G6zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=U7QE9gpnFINa1aLngzY6623yUED3m/sG3SE7mjbT9jQ=; b=e7KRdzvS1mHRKoEDXOUapgdn6eRbk9nZihpV+eEMkxcuHcYTzl8I86jQ0bokJkfox7 4eW6m7PCVTZAdyVAmHauWVVUjDoGjMNC9XYweA04osT0MBa9TiN0vc6a9EOwzJWDG/c3 Q4eyLaVLzAEy5gyF6PbQN2bjkYbWbceq7xUgit7HClLCMssTBOuTxoROyCXrInO+mwqh 614yalnmVyOrYH0Y7TMEnWddt8ZLS2eCs0zsG979QLKlODS8mrN7GTjSX+2FijyOvbb4 wN/0eXZkgHEErU1VBiYbmTdWvUNArmvMbT42NQAJ//uQbFB5jFa1OVAZJ9gf9ks/aYSM 2Qzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fR3iiVke; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si5683788plb.462.2017.11.18.22.11.57; Sat, 18 Nov 2017 22:12:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fR3iiVke; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750817AbdKSGKG (ORCPT + 75 others); Sun, 19 Nov 2017 01:10:06 -0500 Received: from mail-it0-f50.google.com ([209.85.214.50]:46605 "EHLO mail-it0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750744AbdKSGKD (ORCPT ); Sun, 19 Nov 2017 01:10:03 -0500 Received: by mail-it0-f50.google.com with SMTP id r127so8553362itb.5 for ; Sat, 18 Nov 2017 22:10:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=U7QE9gpnFINa1aLngzY6623yUED3m/sG3SE7mjbT9jQ=; b=fR3iiVkeyJ0hmsaLSIeHbgTPh8jijWsYfTdeysOJRHuZ3+NdOPMkO3e9EDKLeRbIiu E/sKQvolxOn//oZtx1LoxyR4xbLt+l/zZsEHsLcw53J6CsBTzpj/7Pm7U8nh9UDfTO1m o5dYKzbp02TMuNf1n8zo96VpcWnERqcWpA/ms2tudsPcVbjvkEOGULMRcivAjA0/Ln8Z cdDgFo6oev6O+JHCW+p5/0I+bWAcVyeC2doEO8r/iyEHdi2GH28Pwcns0Sk5xn56tj61 7LxOyY7j+NC+jSEe1C6OOczkyAmrdyxPCTvfAEdqiXO2bvHOSjyWODgZtX4Ssm04YlmZ o8Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=U7QE9gpnFINa1aLngzY6623yUED3m/sG3SE7mjbT9jQ=; b=YOlVjDXdZ4U9Tv3QeQeKIAoMPagvC+8ryr3WG2jh1GWZmP/OtdaoTNsjsKHXHlQZyB DrFwg9speAhB9xgzu+1Erqz7nfLCjeEtc2JTV2hplSsGSonLa2AejrXeJ9iYw8cVNYID K2Tp4V5Hm640sqLfQDqNi27QLiQVwez6LvO7Phq9Ej84KDBWrCrXlHlkxlvWuuNXbtXg 7osPgWJaLAtmeWFbDgSaA6a27WsfFWiPK+qscq4kuo2WghbTJX9V8GaNGtVsVDl/NJ5r 0rcRBQ6SE3LlE2I71ulnm8Q4QtZ9D2gZuYiRpbMkQpkuY/kxomgK+pI9EYnJKcCtND4N RgmQ== X-Gm-Message-State: AJaThX7Qubxk6bfypaloWiwa1vs1/oCpCk1Jc6byMRly8NMh2gtXWhYt 80mRL9gczU8wSdlgU/GngbwmUA== X-Received: by 10.36.3.65 with SMTP id e62mr12186790ite.99.1511071802436; Sat, 18 Nov 2017 22:10:02 -0800 (PST) Received: from decatoncale.mtv.corp.google.com ([2620:0:1000:1600:71d5:7632:f0c2:9868]) by smtp.gmail.com with ESMTPSA id g93sm315568ioj.51.2017.11.18.22.10.00 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 18 Nov 2017 22:10:01 -0800 (PST) Date: Sat, 18 Nov 2017 22:09:58 -0800 From: Benson Leung To: Jon Hunter Cc: Lee Jones , linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, Brian Norris , Shawn Nematbakhsh , Benson Leung , stable@vger.kernel.org Subject: Re: [PATCH V2 1/2] mfd: cros ec: spi: Don't send first message too soon Message-ID: <20171119060958.GA51565@decatoncale.mtv.corp.google.com> References: <1510670608-19594-1-git-send-email-jonathanh@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline In-Reply-To: <1510670608-19594-1-git-send-email-jonathanh@nvidia.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Jon, On Tue, Nov 14, 2017 at 02:43:27PM +0000, Jon Hunter wrote: > On the Tegra124 Nyan-Big chromebook the very first SPI message sent to > the EC is failing. >=20 > The Tegra SPI driver configures the SPI chip-selects to be active-high > by default (and always has for many years). The EC SPI requires an > active-low chip-select and so the Tegra chip-select is reconfigured to > be active-low when the EC SPI driver calls spi_setup(). The problem is > that if the first SPI message to the EC is sent too soon after > reconfiguring the SPI chip-select, it fails. >=20 > The EC SPI driver prevents back-to-back SPI messages being sent too > soon by keeping track of the time the last transfer was sent via the > variable 'last_transfer_ns'. To prevent the very first transfer being > sent too soon, initialise the 'last_transfer_ns' variable after calling > spi_setup() and before sending the first SPI message. >=20 > Cc: >=20 > Signed-off-by: Jon Hunter > Reviewed-by: Brian Norris Acked-by: Benson Leung --=20 Benson Leung Staff Software Engineer Chrome OS Kernel Google Inc. bleung@google.com Chromium OS Project bleung@chromium.org --AhhlLboLdkugWU4S Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJaESA2AAoJEB8J9XsKL+ZYeO4QAIfvZ7JvGyAAAyCii6ZnVaDk a808+u6i3WszujujcrtSgu3Y5PZpZHivyL+OFWhQ9VJaF6dJ+N3/vhewA/C9izgI P6Hu47XDNsdmj3t2185OpkZpe8p/HFScQmfN6dBasGX9GxKyxFksZPn953nJavAa k8DosACfQEAD27CHUDhvUyR28FNdmAGA0luk+rgwcBfpm9hnbXStopfGBN7IVSH1 jbqItD4+eqZGFxKz7U9Tj/TRnSbP3sUEL95xaegCAnK8eoWOBaAosl/SFiBb1/mZ 34NtEyxME+XCh6vlFv0Syfa2wcTrlUt0DlIWYIbnWnFGAJm1MuPbh03C1gip9Ikl mJ9RVSlwJl2lnzhI1z9pUvkq1+C22w/W5EzO3U/xjsjntNrorOz/oP5SZZ9ZLCUz zZAfaDkJR3gath/I7C0b4PnzG4CNUBAPrDGKD6/ZCgXSh4MokOsGu0yfzvU//u9i O30eCh/Cfd+0RJr5Zo7nd974+tX8NSo02AdhvgnuT/uCnF4dzvwa2Prq+ws4wfYQ xq+8u7QQoXA2bZcnfYU7dxb4QoM6Pk0Lvagv8Q8rPP3v5uxXGudUwAJxCN+OXikX v78KRsAXFViEUboO3cvwORXRDSfivslq0eHjzWKfYPbDa4TfkRfaTezJ2lOGGrDb oItmXpAf+ZjbQDdVAd+r =okKd -----END PGP SIGNATURE----- --AhhlLboLdkugWU4S-- From 1584078702893818780@xxx Tue Nov 14 21:32:54 +0000 2017 X-GM-THRID: 1584053015570192756 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread