lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <09D41BD9-F6BA-4566-8151-ACB3B2274B52@goldelico.com>
Date:   Wed, 9 Dec 2020 21:05:24 +0100
From:   "H. Nikolaus Schaller" <hns@...delico.com>
To:     Andreas Kemnade <andreas@...nade.info>
Cc:     Sven Van Asbroeck <thesven73@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-spi <linux-spi@...r.kernel.org>,
        linux-gpio@...r.kernel.org,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Discussions about the Letux Kernel 
        <letux-kernel@...nphoenux.org>, kernel@...a-handheld.com,
        Lukas Wunner <lukas@...ner.de>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Maxime Ripard <maxime@...no.tech>
Subject: Re: [PATCH] spi: dt-bindings: clarify CS behavior for spi-cs-high and gpio descriptors

Hi Andreas,

> Am 09.12.2020 um 21:01 schrieb Andreas Kemnade <andreas@...nade.info>:
> 
> On Wed, 9 Dec 2020 14:04:26 -0500
> Sven Van Asbroeck <thesven73@...il.com> wrote:
> 
>> On Wed, Dec 9, 2020 at 1:16 PM H. Nikolaus Schaller <hns@...delico.com> 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?

Because it is there in almost all or at least many drivers.

But I have tested with 

> spi->mode |= 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ