Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp714926imu; Tue, 11 Dec 2018 06:30:26 -0800 (PST) X-Google-Smtp-Source: AFSGD/W0458gf720xMaa/PvfB2o9DvFshdh9/ufwhwgJzYqNH+QvJMogsiAyUtkteAnexojILSkm X-Received: by 2002:a17:902:7c85:: with SMTP id y5mr16122411pll.63.1544538626779; Tue, 11 Dec 2018 06:30:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544538626; cv=none; d=google.com; s=arc-20160816; b=X7KVKg5zzBgLrCNRzE5KmIXKz/sffdSAPF1ECZyo2COLqR+ofK8QYJTp9trtdNS4G/ vow96kJ8By638fOLGmZy8dFw4j+C3r2MdnXwmnqSYOT5suFcUpM2FJFGezQbABihPCBB UNwojhoCVpWXTshQ8mfGdddqOVgr0eluQDrium7Km3X8hHY3y8iAkFPDFiEfM4g6ntWp Bj9uZdkQpoVeS+QbNE5VZtwBk67zmYewyXnYv6xsswnBoMMeSPYYlfWJzRhpasE8pp7j sC48tFTnUpD0AA5F19WLfmkLjPUUtlBRLZwjORzrhVPeMVwVyOeXZ7O8Gmq7Pk/Rbpst APpQ== 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; bh=WwVSuC6/bdgUqMBah0m0VUcguMtcEeZiuMn/J+br+UA=; b=HVnlZJTUGgebcJLu8nkNb1ySEZJ3N4wq2nYPcekr/edlSRvSA25CCcOAIwTXnBTlB+ LuNj/6zUtHlb0mv2F9TJWevFxOifh22jgCsFczAq935czsTBKnCSoAJ+moh3vpd9z4IC tpW810CPnFYFLQe9mIO/VFcbczcBmAyCkGxuXVndJfxi9CPX9qtQVUpYskjLXrt+1E71 37ownqmfNmQNlcwr8Tau5btgj374Nsd230cVDzc7qHZxgk8dl2U+BetxVoLFjE5bD4tL KV2S9fqSe1IdUl+DhN1ZWBp2yKDoAnHUU7jfNnaf6skniTHT4Rs+rlOPMkEJATXCs5Eq FpVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=aglXg4vU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10si12400991pll.271.2018.12.11.06.30.11; Tue, 11 Dec 2018 06:30:26 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=aglXg4vU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726775AbeLKO0O (ORCPT + 99 others); Tue, 11 Dec 2018 09:26:14 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:49722 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726625AbeLKO0O (ORCPT ); Tue, 11 Dec 2018 09:26:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WwVSuC6/bdgUqMBah0m0VUcguMtcEeZiuMn/J+br+UA=; b=aglXg4vUsXoFX4uFbcLDNrxQU 28aTN22tqLr5I6XkqtZu3e0H9FLXCtdn1lC/KX9E92T3bapvov9srLsNjv0jXXBwSc66Ip8EYWh06 x6O6wxu8Bafgm1Oxa6VlE/6iQspxDLCIfi3HUQgA6V+2P5c2TLhuX5NX0lshO1MZv66cA=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gWizE-000174-3e; Tue, 11 Dec 2018 14:26:12 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 9E8F6112540E; Tue, 11 Dec 2018 14:26:11 +0000 (GMT) Date: Tue, 11 Dec 2018 14:26:11 +0000 From: Mark Brown To: Clark Wang Cc: "linux-spi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] spi: lpspi: Add cs-gpio support Message-ID: <20181211142611.GF6686@sirena.org.uk> References: <20181204062313.28942-1-xiaoning.wang@nxp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rWhLK7VZz0iBluhq" Content-Disposition: inline In-Reply-To: <20181204062313.28942-1-xiaoning.wang@nxp.com> X-Cookie: Immanuel doesn't pun, he Kant. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --rWhLK7VZz0iBluhq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 04, 2018 at 06:24:59AM +0000, Clark Wang wrote: > Add cs-gpio feature for LPSPI. Use fsl_lpspi_prepare_message() and > fsl_lpspi_unprepare_message() to enable and control cs line. > These two functions will be only called at the beginning and the ending > of a message transfer. > Still support using the mode without cs-gpio. It depends on if attribute > cs-gpio has been configured in dts file. Why is this not using the core support for GPIO chip selects? Note that you can't just implement chip select in the prepare and unprepare, drivers can toggle chip select within a message so the code should be looking at the individual transfers to see if cs_change is set and acting accordingly. --rWhLK7VZz0iBluhq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlwPyQIACgkQJNaLcl1U h9B2swf/VYU6sQbbpmrPoL0HsQRH99qUTf1tXQ6eoxj1gQV3T8Cir05pDhfjwOMX uzNvGECzeszzYfcKi/fvlJIbpIjHqFwE//pZHcvFaFROM2ir/VacYzz5V/+LCU2E CvU8rcxkNFsxPetafRX5c3O3kc6zixC7sfndIF/jzvtdUCjp+JWS18kA3RBif81Y 5IZ5Q75SFckDPN+yHx2lx0Unf5PckD6fEygU8kYc+CgTHGj+C2wwkRVUbiTt0MTS lK30/mQ2u+i21wS1i1TKVLsCjJZDqF7nHKSCnYw5PEG16Z7tKOPSWVIuN9402rX4 6AT+9x3/YQVyfchjU8s9yMUkRMXoFQ== =B20T -----END PGP SIGNATURE----- --rWhLK7VZz0iBluhq--