From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Sven Van Asbroeck <thesven73@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
"broonie@kernel.org" <broonie@kernel.org>,
"xhao@linux.alibaba.com" <xhao@linux.alibaba.com>,
"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>
Subject: Re: [PATCH v1] spi: fix client driver can't register success when use GPIO as CS
Date: Mon, 10 May 2021 14:36:09 +0300 [thread overview]
Message-ID: <YJkaqV4JalpS09bs@smile.fi.intel.com> (raw)
In-Reply-To: <CAGngYiVNE1FjsJZeHL5afpWeqf7pRhHqUcKkChML3KQ=6cj=Bw@mail.gmail.com>
On Sat, May 08, 2021 at 07:46:13AM -0400, Sven Van Asbroeck wrote:
> On Sat, May 8, 2021 at 3:38 AM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> >> 2. Drive the gpiod chip select using the raw value, ignoring the
> >> built-in polarity, which treats it the same as a gpio_xxx. Nice!
> >>
> >
> > Looks nice (if for now don’t take into account the zillion of drivers to be changed), but IIRC last time discussions about this piece of code, the problem also in DT itself, you may not break boards with already cooked DTs. If you are sure about this, go ahead!
>
> Yes, you're absolutely right, the zillion of drivers to be changed is
> a serious problem. I'm definitely not trying to sweep that under the
> carpet...
>
> The rule table seems to indicate that the gpio's second devicetree
> flag is ignored when it's used as a SPI gpio. So changing where the
> polarity is stored, should not break DT? It may have repercussions
> elsewhere though, not sure.
>
> (I hope the formatting will come out ok here. If not, use the link below)
> device node | cs-gpio | CS pin state active | Note
> ================+===============+=====================+=====
> spi-cs-high | - | H |
> - | - | L |
> spi-cs-high | ACTIVE_HIGH | H |
> - | ACTIVE_HIGH | L | 1
> spi-cs-high | ACTIVE_LOW | H | 2
> - | ACTIVE_LOW | L |
>
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/spi/spi-controller.yaml?h=v5.12#n54
This table is incompatible with ACPI. So we can't unify them until each of them
will play by the same rules. Can't say it won't happen, but it's far from that.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-05-10 11:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-06 11:49 [PATCH v1] spi: fix client driver can't register success when use GPIO as CS Xin Hao
2021-05-06 12:30 ` Linus Walleij
2021-05-06 14:16 ` Andy Shevchenko
2021-05-07 1:55 ` Xin Hao
[not found] ` <CAHp75Vev1D5+QWyGCm+HgpdAyT4Uq_OAp7dCemVf9Cdvoay=Og@mail.gmail.com>
[not found] ` <6bd8f178-51a2-3f45-8a16-80fdd4a3ed8e@linux.alibaba.com>
[not found] ` <CAHp75Vfh+jqNLLbwWDe8pi1dQafnNFHak1Hk=5Cw3J+kJX9r3Q@mail.gmail.com>
2021-05-07 21:33 ` Linus Walleij
2021-05-08 1:22 ` xhao
2021-05-08 2:36 ` Sven Van Asbroeck
2021-05-08 11:38 ` Sven Van Asbroeck
[not found] ` <CAHp75VfD5kEnjvvRWUJwpmFaWksnnTf_ewBNDsxz3W3kQMUv+w@mail.gmail.com>
2021-05-08 11:46 ` Sven Van Asbroeck
2021-05-08 12:48 ` Sven Van Asbroeck
2021-05-10 11:36 ` Andy Shevchenko [this message]
2021-05-10 13:56 ` Sven Van Asbroeck
2021-05-10 14:01 ` Andy Shevchenko
2021-05-10 14:27 ` Sven Van Asbroeck
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=YJkaqV4JalpS09bs@smile.fi.intel.com \
--to=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-spi@vger.kernel.org \
--cc=thesven73@gmail.com \
--cc=xhao@linux.alibaba.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