Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1189648pxu; Sat, 12 Dec 2020 05:05:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+JDO4t5r8eZiMR4Cq/nflbs0diwI25wl9PEa+sJY0GZ58KRIsS+oOVS3EkJZb4z9BuOQl X-Received: by 2002:a50:ee97:: with SMTP id f23mr15895369edr.311.1607778317983; Sat, 12 Dec 2020 05:05:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607778317; cv=none; d=google.com; s=arc-20160816; b=VWmVKjiTCj+yL2vr+CVXKoMGdeoRLKKwkAbdGm8HwqHAHlCIRMEAJYRfcEsGwmLnGz BK1PyqXsrkN24SDrS0Secl2SqX8ckdfeLXzw7dX7caKFp7OUkh+6i7viUvADNf5XsoYG 4v3Ia+iDvlUefJErZQT/DuRfzxtNgK6DkFkCokAZNoAmvR17RHf5d0FwtFvuf8V7J6Ht Hxp7E3ucp2q62Pq+rvoH9zftMevejeg6Xnm8ktkx0R2kKn3cLjhU50VOf9JcDV7uQglO CJy3P7brP50g5CDW8nQHWaCgtZG1QumCXHSy+enocVS32WAwdUKxrwU0UmNT+CMSrWAX 33OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:dkim-signature:date; bh=pxaGP1wF6FdOzThGgB0B+9fuFGXyt0rFq3tlehPRIL0=; b=wMVwB70Oo/zUWRLUSEhKpqgfI5CFzJeIsJp2Q8s+dlUoRZbzqq7slbv5l013cHlCm/ +VqQAHj2iaph6i1m4II0GO1RT23l8w382j7JcrjDLMe/RdC9neJWX19HSKZb6vu6+btS aDjEjNKBBwD1BWMRM3hJ6PydZmMLD1TowAfS9ySjombW/jvJXIEvyQBurRO6o1vbTZ0x +CDBUF4cR1Sr+hTuiPowgyteSwhh2fgqGMfyVOxmIC1TUyAZzhR78S8pmeosGnGhclq9 Qtmc7gF6UfuX0VfeDUsM0Rszq/aMFgVD2OT8dp5RPFnYkq4POMTWQZMSyAJiOm8onJcx Vo6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PA8BFLEU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y10si6328141ejw.156.2020.12.12.05.04.54; Sat, 12 Dec 2020 05:05:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PA8BFLEU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436752AbgLKNTg (ORCPT + 99 others); Fri, 11 Dec 2020 08:19:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:52840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404425AbgLKNS6 (ORCPT ); Fri, 11 Dec 2020 08:18:58 -0500 Date: Fri, 11 Dec 2020 13:18:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607692697; bh=2E127mU5eJ6ue3tzTmMDUSWHAoCzUtkbINjTlopsJIA=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=PA8BFLEUlLmq/basaIXKyyzg6K1lX9Eygrt9+Kdw6TmDi7YEYc92Zl5c+Tag37uQZ l97JGYpnkd1BbYjzdB0RTno6/PTh6r+AZKiY0Vg7Ae1pcsKQX09d1aYDGIg8h9HnBw RdvCvH+Jp+1Wg8Ee5T9sDAzSN1VLrvsEWkhWyXj/PzBplt2/zOnRoejD1g4tj2/HFo Jo/eAUwu+GMTyQ4GEnoiUiBM21pdVD1i/YWZG7EaQK2FbvzI9KDD50ImnKewK4fUQ/ Z0IoDweyxZZohS4++spkMSy+eEM4mSgQchrSzDxLlpG0ZbTLBJbrKhGW/6t2Bsfa0s SBHkOgeAcG7/w== From: Mark Brown To: Sven Van Asbroeck Cc: "H. Nikolaus Schaller" , Rob Herring , Linus Walleij , linux-spi , linux-gpio@vger.kernel.org, devicetree , Linux Kernel Mailing List , Discussions about the Letux Kernel , kernel@pyra-handheld.com, Maxime Ripard , Lukas Wunner , Laurent Pinchart , Andreas Kemnade Subject: Re: [PATCH] spi: dt-bindings: clarify CS behavior for spi-cs-high and gpio descriptors Message-ID: <20201211131810.GB4929@sirena.org.uk> Mail-Followup-To: Sven Van Asbroeck , "H. Nikolaus Schaller" , Rob Herring , Linus Walleij , linux-spi , linux-gpio@vger.kernel.org, devicetree , Linux Kernel Mailing List , Discussions about the Letux Kernel , kernel@pyra-handheld.com, Maxime Ripard , Lukas Wunner , Laurent Pinchart , Andreas Kemnade References: <3bed61807fff6268789e7d411412fbc5cd6ffe2a.1607507863.git.hns@goldelico.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TRYliJ5NKNqkz5bu" Content-Disposition: inline In-Reply-To: X-Cookie: Nostalgia isn't what it used to be. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --TRYliJ5NKNqkz5bu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Dec 09, 2020 at 12:36:40PM -0500, Sven Van Asbroeck wrote: > On Wed, Dec 9, 2020 at 4:57 AM H. Nikolaus Schaller wrote: > > + device node | cs-gpio | CS pin state active | Note > > + ================+===============+=====================+===== > > + spi-cs-high | - | H | > > + - | - | L | > > + spi-cs-high | ACTIVE_HIGH | H | > > + - | ACTIVE_HIGH | L | 1 > > + spi-cs-high | ACTIVE_LOW | H | 2 > > + - | ACTIVE_LOW | L | > > + > Doesn't this table simply say: > - specify 'spi-cs-high' for an active-high chip select > - leave out 'spi-cs-high' for an active-low chip select > - the gpio active high/active low consumer flags are ignored > ? It seems to, yes. > If so, then I would simply document it that way. > Simple is beautiful. Yeah, it'd definitely be easier to read and clearer what people should actually do. As Linus said it'd also be a good idea to explicitly say that this is not great design or particularly intentional since it could be pretty confusing for someone trying to understand why the bindings are the way they are. I'm going to apply this anyway to make sure we get this documentated but some incremental improvements along these lines would be good. --TRYliJ5NKNqkz5bu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl/TcZEACgkQJNaLcl1U h9AhFggAgIvhGZX6g4DZGo69/v8qSfuNZJ8ZCbQTMs4G0PR/lhIG26joAjbftMvK zcxjD6svtCScdLgl3ES3AnmZYqUIy10wH6SGPd9XkpYwNRTHaGrLYsK59k//Luaq Qh3j7FtB42unAmTVI1rVA2KJac2FkvvNuBxNN8g75+95DXbtnvAkxbYTtFE0zit0 q4jh58H0Zh24LpUhoZKZ2w6/Ra1XaqY1vkh0ys7tMTkShhs1LgSY8OzjDiZ36O1c JIlz5Fwn1uEkJhxwErccG3NYAdxOqiajOWZDM56ky4T1420W+MTwpux/YXfRWQTW X/ZvM2NIHyPr5ZnEfrYTVqp+uUKAqw== =bTcQ -----END PGP SIGNATURE----- --TRYliJ5NKNqkz5bu--