linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sven Van Asbroeck <thesven73@gmail.com>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Mark Brown <broonie@kernel.org>,
	kernel list <linux-kernel@vger.kernel.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Discussions about the Letux Kernel 
	<letux-kernel@openphoenux.org>,
	Andreas Kemnade <andreas@kemnade.info>
Subject: Re: [BUG] SPI broken for SPI based panel drivers
Date: Tue, 1 Dec 2020 13:43:36 -0500	[thread overview]
Message-ID: <CAGngYiXWo4QEDF73wa7RDah1yUUOO1URoD_k5Fd5JMqSL2JXGg@mail.gmail.com> (raw)
In-Reply-To: <BD3995F3-F4E6-4DC9-B0B9-5DCD6655F049@goldelico.com>

Hi Nikolaus,

On Tue, Dec 1, 2020 at 12:13 PM H. Nikolaus Schaller <hns@goldelico.com> wrote:
> > Am 01.12.2020 um 17:53 schrieb Sven Van Asbroeck <thesven73@gmail.com>:
> > On Tue, Dec 1, 2020 at 11:43 AM H. Nikolaus Schaller <hns@goldelico.com> wrote:
> >>
> >> You are right. It is active low.
> >>
> >
> > In that case, we have a very simple solution, just remove the spi-cs-high,
> > and things will work.
>
> We originally had it that way and because there was a change in gpiolib we had
> to introduce it.

The current rules re. spi chip-selects in devicetrees are here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpio/gpiolib-of.c?h=v5.10-rc6#n191

This is the way I see things:
- according to the current rules, your devicetree describes a spi panel with
  an active-high chip select
- the actual chip select of your panel is active-low
- a spi/gpiod bug inverted the chip-select in many instances
- because of this bug, your devicetree happened to work before 766c6b63aa04
- 766c6b63aa04 ("spi: fix client driver breakages when using GPIO descriptors")
  fixes this chip-select polarity bug
- you now need to remove your devicetree work-around for this bug by reverting
  f1f028ff89cb0d3

>
> I am not sure if DT maintainers accept that we revert a DT change just to
> handle some change in a driver. Usually they insist on fixing a driver and
> live with the DT. DT is carved in stone or could be ROM...

This is above my paygrade, but I've always assumed that the devicetree ABI
is an in-kernel ABI, i.e. not a userspace ABI. Meaning that it is flexible and
there is no obligation to keep it 100% backwards compatible. Of course Rob
Herring may want to keep it as backwards-compatible as possible, but that's
an altogether different thing from having a userspace-type ABI.

>
> So you could try to submit a revert of f1f028ff89cb0d3 with a description
> why it is needed. And please make sure that it is also applied where your
> patch is backported to stable. So it should have some
>
> Fixes: 766c6b63aa04 ("spi: fix client driver breakages when using GPIO descriptors")

I have no insight in your devicetrees, and no hardware to test it out either.
As a user of these trees, you are best placed to make the change and test it
out. I invite you to submit a patch (revert of f1f028ff89cb0d3) to the
mailing list.

>
>
> So you mean you are just restoring the behaviour before
>
>         6953c57ab172
>
> was introduced?
>

That was based on my incorrect interpretation of the devicetree spi cs
rules, my apologies. I have linked to the correct rules in the link above.

  reply	other threads:[~2020-12-01 18:44 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30 19:03 [BUG] SPI broken for SPI based panel drivers H. Nikolaus Schaller
2020-11-30 20:13 ` Sven Van Asbroeck
2020-11-30 20:22   ` Sven Van Asbroeck
2020-12-01  8:59   ` H. Nikolaus Schaller
2020-12-01 12:16     ` Mark Brown
2020-12-01 14:05       ` H. Nikolaus Schaller
2020-12-01 14:20         ` Linus Walleij
2020-12-01 14:34           ` Sven Van Asbroeck
2020-12-01 14:35           ` H. Nikolaus Schaller
2020-12-01 15:52             ` Sven Van Asbroeck
2020-12-01 16:46               ` H. Nikolaus Schaller
2020-12-01 16:10             ` Sven Van Asbroeck
2020-12-01 16:39               ` H. Nikolaus Schaller
2020-12-01 16:53                 ` Sven Van Asbroeck
2020-12-01 17:10                   ` H. Nikolaus Schaller
2020-12-01 18:43                     ` Sven Van Asbroeck [this message]
2020-12-02 12:19                       ` Mark Brown
2020-12-04 10:08                       ` H. Nikolaus Schaller
2020-12-04 13:46                         ` Sven Van Asbroeck
2020-12-04 16:49                           ` H. Nikolaus Schaller
2020-12-04 19:19                             ` Sven Van Asbroeck
2020-12-04 21:31                               ` H. Nikolaus Schaller
2020-12-05  0:25                             ` Linus Walleij
2020-12-05  7:04                               ` H. Nikolaus Schaller
2020-12-09  8:04                                 ` Andreas Kemnade
2020-12-09  8:40                                   ` H. Nikolaus Schaller
2020-12-09  8:38                                 ` Linus Walleij
2020-12-09  8:45                                   ` H. Nikolaus Schaller
2020-12-01 22:51                     ` Linus Walleij
2020-12-01 16:44               ` [Letux-kernel] " Andreas Kemnade
2020-12-01 16:51                 ` H. Nikolaus Schaller
2020-12-01 16:52                 ` H. Nikolaus Schaller
2020-12-01 16:55                 ` Sven Van Asbroeck
2020-12-01 16:20           ` Mark Brown
2020-12-01 16:41             ` H. Nikolaus Schaller
2020-12-01 17:11               ` Mark Brown
2020-12-01 12:41     ` Sven Van Asbroeck
2020-12-01 13:32       ` H. Nikolaus Schaller
2020-12-01 14:08         ` Sven Van Asbroeck
2020-12-01 15:33           ` Mark Brown
2020-12-05 20:57   ` Pavel Machek
2020-12-07 13:43     ` 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=CAGngYiXWo4QEDF73wa7RDah1yUUOO1URoD_k5Fd5JMqSL2JXGg@mail.gmail.com \
    --to=thesven73@gmail.com \
    --cc=andreas@kemnade.info \
    --cc=broonie@kernel.org \
    --cc=hns@goldelico.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=letux-kernel@openphoenux.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).