From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Mark Brown <broonie@kernel.org>
Cc: Sven Van Asbroeck <thesven73@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
linux-spi <linux-spi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>
Subject: Re: SPI not working on 5.10 and 5.11, bisected to 766c6b63aa04 ("spi: fix client driver breakages when using GPIO descriptors")
Date: Thu, 14 Jan 2021 13:33:50 +0100 [thread overview]
Message-ID: <006d1594-8eec-3aad-1651-919071e89f3b@csgroup.eu> (raw)
In-Reply-To: <20210114115958.GB4854@sirena.org.uk>
Le 14/01/2021 à 12:59, Mark Brown a écrit :
> On Thu, Jan 14, 2021 at 12:27:42PM +0100, Christophe Leroy wrote:
>
>> Today I have in the DTS the CS GPIOs declared as ACTIVE_LOW.
>
>> If I declare them as ACTIVE_HIGH instead, then I also have to set
>> spi-cs-high property, otherwise of_gpio_flags_quirks() is not happy and
>> forces the GPIO ACTIVE LOW.
>
>> When I set spi-cs-high property, it sets the SPI_CS_HIGH bit in spi->mode.
>
> OK, so it sounds like you want SPI_CS_HIGH and that is being set
> correctly?
>
>> In fsl_spi_chipselect(), we have
>>
>> bool pol = spi->mode & SPI_CS_HIGH
>>
>> Then
>> pdata->cs_control(spi, pol);
>
>> So changing the board config is compensated by the above, and at the end it still doesn't work.
>
> This is a driver bug, the driver set_cs() operation should not be
> modifying the value it is told to set.
>
A driver bug ? Or maybe a change forgotten in commit 766c6b63aa04 ("spi: fix client driver
breakages when using GPIO descriptors") ?
I'm almost sure it was not a bug, it is in line which what is said in the comment removed by the
above mentionned commit.
I'll send a fix.
Christophe
next prev parent reply other threads:[~2021-01-14 12:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 8:49 SPI not working on 5.10 and 5.11, bisected to 766c6b63aa04 ("spi: fix client driver breakages when using GPIO descriptors") Christophe Leroy
2021-01-13 12:33 ` Mark Brown
2021-01-14 11:27 ` Christophe Leroy
2021-01-14 11:59 ` Mark Brown
2021-01-14 12:33 ` Christophe Leroy [this message]
2021-01-14 13:22 ` Mark Brown
2021-01-14 13:42 ` Christophe Leroy
2021-01-14 13:59 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=006d1594-8eec-3aad-1651-919071e89f3b@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=broonie@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=thesven73@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).