Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4271681pxu; Wed, 9 Dec 2020 12:40:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUSdMqyrTRqs09YCPIvReP/Z5fthYnPpJHKJd2k1TSBXwmaBaSdaO/Rxyur8YJQN/Yh8h+ X-Received: by 2002:a17:907:961b:: with SMTP id gb27mr3523644ejc.313.1607546459154; Wed, 09 Dec 2020 12:40:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607546459; cv=none; d=google.com; s=arc-20160816; b=hUt4NzAWEZjf5PkKj7es97udtiB79LCY6k44gL+MULHgGrrIifdda6o/Jiz1sxuAYS uUHpntlKNBRzmy3rHA9zWwaYkCtCY3IbQIMx8wDPNsNfwz35N26dQnPauceWSwVRNX7a A1cI7miwDfzOjNW9WUSPJBi0q7tkIb5HrNVrklEM9gF/GnAOSg8rdRWiS1j23nMxblsM bT9owPiOha9p5VJtN2VV7gNR3BqpbiMHXWBlSrhCi/uguEDBedyle4Oybzf1iui9Kw+Z UpSuNtrNIhs73rWFDD6+r6GXej3Cb+zyB6GLfuhp+QWzTT9JVhYuPD6q2o8AetZHBepG 7tSA== 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=kAc/V5WPeRumZiIL2C7//K0I/ag/3WCMLZkC6BLUYIY=; b=pJ3ruyAPWrOjwG6Dulve57ZRdwopcyXqXjQ9woBU9fEuU79b41M4l0tlijuLNH3e/3 /7X5qvMuKnWaCum8Uw1ToGkMrynbqM3OrHF09xujjv1a+V0TPWGxs5dlaThPCZtwPxrj rMLnrFpyqV+xLieof9lSppJQ9p1aLsFA/Sw9pMbYOUbeetFBF9mB06GDbuGykN/zABIb S7QwjWMlhQUxS0AQP2F1bac6737BNEpQiW0ilP1cQTVcbQO0zImovIeX4oflnoLUI8aM h3O05mixdFT7WUutQjauxFvEbcdIZxI8zcrhQUheAOsRxAUtfmY2rx9GJyIhtnyWv+F9 zGtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=tnN7fzM2; 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 y4si1259639eju.331.2020.12.09.12.40.35; Wed, 09 Dec 2020 12:40:59 -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=tnN7fzM2; 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 S1732057AbgLIUIe (ORCPT + 99 others); Wed, 9 Dec 2020 15:08:34 -0500 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.83]:32891 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726439AbgLIUId (ORCPT ); Wed, 9 Dec 2020 15:08:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1607544339; s=strato-dkim-0002; d=goldelico.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject:From: Subject:Sender; bh=kAc/V5WPeRumZiIL2C7//K0I/ag/3WCMLZkC6BLUYIY=; b=tnN7fzM2sHaoRsjb6kd5YC4nSvZyYh+2wNJp1HWOjmlzWWEcAW5n6FmAPu13bk5z5Q qvt4r9ji543zqihPd9srP18YijIbM///g6yetmY+beKKCdM7KH+yHq1Hnkd2BQBt3ldj 1z+IHyg/pUVwJ8xr1eU2IQxPtpuPftD5ekq8qUz+8b5iwkeGXK0/w1gupIgTJ/NduzYs qTXalCN7L5drpsBjmByj2+Z5Iu9hLfTx3n+Wl9DUu3z6qv5NHI/IH/Z2LsoiNeo9Eba0 4bwnenL9wr/FGtrrFVaHk0P8sy903uS7eGcvJ+Q9vSNnEAKs2XqXsV19gAqhvF6R+Ajq vr6g== 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 908871wB9K5P8MV (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 21:05:25 +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: <20201209210133.44ab9c97@aktux> Date: Wed, 9 Dec 2020 21:05:24 +0100 Cc: Sven Van Asbroeck , 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 , Maxime Ripard Content-Transfer-Encoding: quoted-printable Message-Id: <09D41BD9-F6BA-4566-8151-ACB3B2274B52@goldelico.com> References: <3bed61807fff6268789e7d411412fbc5cd6ffe2a.1607507863.git.hns@goldelico.com> <3FA1D050-3BD5-4A97-9D83-520CCF75D147@goldelico.com> <20201209210133.44ab9c97@aktux> To: Andreas Kemnade X-Mailer: Apple Mail (2.3124) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andreas, > Am 09.12.2020 um 21:01 schrieb Andreas Kemnade : >=20 > On Wed, 9 Dec 2020 14:04:26 -0500 > Sven Van Asbroeck wrote: >=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 >>=20 >> The inversion you witnessed was a bug caused by spi client drivers = that >> simply "plow over" the SPI_CS_HIGH mode flag. This includes the panel = driver >> you're using, see: >> = https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/dr= ivers/gpu/drm/panel/panel-tpo-td028ttec1.c?h=3Dv5.10-rc6#n337 >>=20 > ah, it would be set in spi->mode and is cleared by >=20 > spi->mode =3D SPI_MODE_3; >=20 >=20 > Hmm, but we have > spi-cpol; > spi-cpha; > in devicetree. Why do we need that spi->mode line at all? Because it is there in almost all or at least many drivers. But I have tested with=20 > spi->mode |=3D SPI_MODE_3; which should keep the mode intact. Right? That did not work either. So let's not derail the discussion by moving to the code of some specific driver. Even if that is wrong it does not solve what this patch wants to solve. BR and thanks, Nikolaus