Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4267275pxu; Wed, 9 Dec 2020 12:32:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwBgOclpgOLMiflj9J+O8drNtXG29Uw+GtWujIIVJU7bscWUph7iteomgtEwqxPdRirvx/ X-Received: by 2002:a17:906:1955:: with SMTP id b21mr3589979eje.236.1607545972822; Wed, 09 Dec 2020 12:32:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607545972; cv=none; d=google.com; s=arc-20160816; b=qtiiqV6DqxN6EDMsnPTa6gSDFxz8yVjXi5q+K9ouQAVBkkOjFSYg9bmG382/n25tHK /u1iMpWF6UdNoOEh5s3gRwdaqJ3B4gOE4i9y2sk77w5aLAF0hrVk5REoXnUewkchGE7F cGMnMpV4Tqti7rgTBNkOSgcqtK7LsgTNJhHPcS67NmUkzw60iG1CUHbMgDqQlffdZxTo rhGbL/Q7NL8Sx5Bu1jVeNiWvpizZUXapwqyinTaOrd+MA9BA58pNL23iswTGDPCqUfHK dXog0VIXv7OynEr0JW+AUk3pgNKFc7XWgLIul9fhTaDKag9QyVZk0IYAurgIO75jD1KE O+GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:mime-version :subject:dkim-signature; bh=hBXvPQ4Ec+qpGD7kc0N2xFQQUJzkElcDdJ7p/ycRvDg=; b=QDvVhXj4WDxHhs3gBSyYeHZfiRWp+L0EmcgsOZj80CTcfFpLutY1iuEWeEJ80bnTAR 1F5kXktFcqLehIQQr0vsVz+6VgYN6CgKKCyMFpNV42mbXbCRQLH1DNKVGSoPUF1QAkwX Xd/vvuMg2Xp9nLZoaYIAaLP6DNjvhbGw6HN222dt2q/wyBWV8BfpK2bcbBuGK99kxeri bHihNnVw+gyITrHt/MW4KyH+ybUxoyZ+8vyFV/iFRbD5YP+uWomCqETsAmqfPVFsLFY1 +XIOByr6eI91jJwMTTWLZIWw9eZQXGnHRWaYZqFonBK/D2IVmueVRJTyxT2ECMpbvP8i SvHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=hXQjTlcx; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x13si1299654ejb.243.2020.12.09.12.32.29; Wed, 09 Dec 2020 12:32:52 -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=@goldelico.com header.s=strato-dkim-0002 header.b=hXQjTlcx; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729243AbgLITfN (ORCPT + 99 others); Wed, 9 Dec 2020 14:35:13 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.51]:11681 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726840AbgLITfG (ORCPT ); Wed, 9 Dec 2020 14:35:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1607542325; s=strato-dkim-0002; d=goldelico.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject:From: Subject:Sender; bh=hBXvPQ4Ec+qpGD7kc0N2xFQQUJzkElcDdJ7p/ycRvDg=; b=hXQjTlcxzo4FxmpPSjAM9TKA/AwUslSPWvK/0ANsjM9p5IqQO1rzm78e5YeQHjnXTy 4edy2pA7FotILrfuInBIDwYA4CYc3wlbufjEavnzEqecPNfU3Lmz2a+PspGJiGegXcRT kOrEpjarHbNP8H0dTi9GKC3HyPnrcGBDRcIpL9do93M0JKgB6Irr8jeK4YqFw3LBatBD ZhN1G2TiL6+x6VDjsE/LUqfhK4KZEi2bstbm5UUQqYXoye2xxtPHmdCe0/hi2ZjV5s3E uDvEbZtb6WkHjrfI6ATz5OmxRCytoZa1uGgczLtA1tFa8TyQimQgKHech9eAFXwLU0lV heAQ== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj5Qpw97WFDlafXAoNHQ==" X-RZG-CLASS-ID: mo00 Received: from imac.fritz.box by smtp.strato.de (RZmta 47.6.2 DYNA|AUTH) with ESMTPSA id 908871wB9JVt8I5 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Wed, 9 Dec 2020 20:31:55 +0100 (CET) Subject: Re: [PATCH] spi: dt-bindings: clarify CS behavior for spi-cs-high and gpio descriptors Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=us-ascii From: "H. Nikolaus Schaller" In-Reply-To: Date: Wed, 9 Dec 2020 20:31:55 +0100 Cc: Mark Brown , 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, Lukas Wunner , Laurent Pinchart , Andreas Kemnade , Maxime Ripard Content-Transfer-Encoding: quoted-printable Message-Id: References: <3bed61807fff6268789e7d411412fbc5cd6ffe2a.1607507863.git.hns@goldelico.com> <3FA1D050-3BD5-4A97-9D83-520CCF75D147@goldelico.com> To: Sven Van Asbroeck X-Mailer: Apple Mail (2.3124) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Am 09.12.2020 um 20:04 schrieb Sven Van Asbroeck = : >=20 > On Wed, Dec 9, 2020 at 1:16 PM H. Nikolaus Schaller = wrote: >>=20 >> This is also what made me wonder if that is really intended because = then >> the whole discussion about the cs-gpio-flags and inversion and the = fixes >> would not have been needed. The current code and fixes are all about >> not ignoring the flags... >=20 > The inversion you witnessed was a bug caused by spi client drivers = that The inversion we witnessed came from: commit 6953c57ab172 "gpio: of: Handle SPI chipselect legacy bindings" There, I read a verbal description of the table I want to formalize with this patch, because natural language is not as precise as the = language of logic. This has nothing to do with driver code, which remained and remains = unchanged for long time. >=20 >> Secondly, please imagine some reader of a device tree who finds >>=20 >> cs-gpios =3D <&gpio 7 ACTIVE_LOW>; >> spi-cs-high; >=20 > That reader looks at the rules, sees that: > - the ACTIVE_LOW is ignored, > - presence of spi-cs-high means active-high > and concludes this chip-select is active-high. This misses information what the reader should do to resolve the obviously missing beauty of the DT. a) remove spi-cs-high; b) change to ACTIVE_HIGH Both appear valid in first place. But one is preferred. This is again nowhere documented if you simplify the table.