From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: bier@b-x3vxmd6m-2058.local, Mark Brown <broonie@kernel.org>,
Sven Van Asbroeck <thesven73@gmail.com>,
linux-spi <linux-spi@vger.kernel.org>
Subject: Re: [PATCH v1] spi: fix client driver can't register success when use GPIO as CS
Date: Thu, 6 May 2021 17:16:32 +0300 [thread overview]
Message-ID: <YJP6QIl+jnjKPlRo@smile.fi.intel.com> (raw)
In-Reply-To: <CACRpkdYyXO=47aTyhUfY6MLNUFiRUzORLGDMeV7E4JULbx3hbQ@mail.gmail.com>
On Thu, May 06, 2021 at 02:30:01PM +0200, Linus Walleij wrote:
> On Thu, May 6, 2021 at 1:45 PM Xin Hao <bier@b-x3vxmd6m-2058.local> wrote:
> > From: Xin Hao <xhao@linux.alibaba.com>
> >
> > When i was testing the TPM2 device, I found that the driver
> > always failed to register which used SPI bus and GPIO as CS
> > signal, i found that the reason for the error was that CS could
> > not be set correctly, so there fixed it.
> >
> > Fixes: 766c6b63aa044e ("spi: fix client driver breakages when using
> > GPIO descriptors")
> > Signed-off-by: Xin Hao <xhao@linux.alibaba.com>
>
> (...)
> > /* polarity handled by gpiolib */
> > gpiod_set_value_cansleep(spi->cs_gpiod,
> > - enable1);
> > + !enable);
>
> We have been over this code a lot of times, can you
> help us to investigate the root cause here and check
> how the interrupts are provided on this platform.
>
> TPM2 makes me think that this is an Intel platform
> and maybe ACPI of some kind so you need to run
> it by Andy, who is working on some related fixes.
The above is exactly what my quirk [1] for ACPI does in case the controller
gets GPIOs from the ACPI.
[1]: https://gitlab.com/andy-shev/next/-/commit/5ccbdbb4787d871722f361d77c5f3cb806811c48
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-05-06 14:16 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 [this message]
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
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=YJP6QIl+jnjKPlRo@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bier@b-x3vxmd6m-2058.local \
--cc=broonie@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-spi@vger.kernel.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