From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0741AC4361B for ; Wed, 9 Dec 2020 20:02:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B312923BEF for ; Wed, 9 Dec 2020 20:02:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388046AbgLIUCT (ORCPT ); Wed, 9 Dec 2020 15:02:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730106AbgLIUCS (ORCPT ); Wed, 9 Dec 2020 15:02:18 -0500 Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a01:238:4321:8900:456f:ecd6:43e:202c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E3FFC0613CF; Wed, 9 Dec 2020 12:01:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To: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=8F3+EPqz0dxBHDJRmRDC3uMMxguu00ELq3fa08RQ0eo=; b=XiVCnKkhEeoXMupclMDczRuUsa IG3QZN2hnju4jc5cQ+ke3ZjsK1VaPm4MnyjmKfLBznndhbolGqtzK7/G+OHm6VKJgqd/H2Fvc2P1z 4zDlwtZqLzTl3ejxY/NIZg0z5x7LyuCBoAyqNhIwWgXu0nZvcRzC/ccTg6X+VYy+wd1Y=; Received: from p200300ccff0981001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff09:8100:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1kn5eY-0000Cz-2v; Wed, 09 Dec 2020 21:01:34 +0100 Date: Wed, 9 Dec 2020 21:01:33 +0100 From: Andreas Kemnade To: Sven Van Asbroeck Cc: "H. Nikolaus Schaller" , 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, Maxime Ripard , Lukas Wunner , Laurent Pinchart , Maxime Ripard Subject: Re: [PATCH] spi: dt-bindings: clarify CS behavior for spi-cs-high and gpio descriptors Message-ID: <20201209210133.44ab9c97@aktux> In-Reply-To: References: <3bed61807fff6268789e7d411412fbc5cd6ffe2a.1607507863.git.hns@goldelico.com> <3FA1D050-3BD5-4A97-9D83-520CCF75D147@goldelico.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Wed, 9 Dec 2020 14:04:26 -0500 Sven Van Asbroeck wrote: > On Wed, Dec 9, 2020 at 1:16 PM H. Nikolaus Schaller wrote: > > > > 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... > > 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/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c?h=v5.10-rc6#n337 > ah, it would be set in spi->mode and is cleared by spi->mode = SPI_MODE_3; Hmm, but we have spi-cpol; spi-cpha; in devicetree. Why do we need that spi->mode line at all? Regards, Andreas