* [PATCH v1] pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request
@ 2020-12-07 17:59 Andy Shevchenko
2020-12-07 18:08 ` Andy Shevchenko
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Andy Shevchenko @ 2020-12-07 17:59 UTC (permalink / raw)
To: Mika Westerberg, linux-gpio, Linus Walleij
Cc: Andy Shevchenko, Pierre-Louis Bossart
Mistakenly the buffers (input and output) become together enabled for a little
period of time during GPIO request. This is problematic, because instead of
initial motive to disable them in the commit af7e3eeb84e2
("pinctrl: intel: Disable input and output buffer when switching to GPIO"),
the driven value on the pin, which might be used as an IRQ line, brings
firmware of some touch pads in an awkward state that needs a full power off
to recover. Fix this by, as stated in a culprit commit, disabling the buffers.
Fixes: af7e3eeb84e2 ("pinctrl: intel: Disable input and output buffer when switching to GPIO")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210497
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pinctrl/intel/pinctrl-intel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index e77145e3b31b..5cd720f5b0e1 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -452,8 +452,8 @@ static void intel_gpio_set_gpio_mode(void __iomem *padcfg0)
value |= PADCFG0_PMODE_GPIO;
/* Disable input and output buffers */
- value &= ~PADCFG0_GPIORXDIS;
- value &= ~PADCFG0_GPIOTXDIS;
+ value |= PADCFG0_GPIORXDIS;
+ value |= PADCFG0_GPIOTXDIS;
/* Disable SCI/SMI/NMI generation */
value &= ~(PADCFG0_GPIROUTIOXAPIC | PADCFG0_GPIROUTSCI);
--
2.29.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v1] pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request
2020-12-07 17:59 [PATCH v1] pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request Andy Shevchenko
@ 2020-12-07 18:08 ` Andy Shevchenko
2020-12-08 8:34 ` Linus Walleij
2020-12-07 18:16 ` Mika Westerberg
2020-12-08 0:56 ` Kai-Heng Feng
2 siblings, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2020-12-07 18:08 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Mika Westerberg, open list:GPIO SUBSYSTEM, Linus Walleij,
Pierre-Louis Bossart
On Mon, Dec 7, 2020 at 8:02 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> Mistakenly the buffers (input and output) become together enabled for a little
> period of time during GPIO request. This is problematic, because instead of
> initial motive to disable them in the commit af7e3eeb84e2
> ("pinctrl: intel: Disable input and output buffer when switching to GPIO"),
> the driven value on the pin, which might be used as an IRQ line, brings
> firmware of some touch pads in an awkward state that needs a full power off
> to recover. Fix this by, as stated in a culprit commit, disabling the buffers.
Linus, since we are at rc7 I'm not going to send a PR for this single
fix (I truly do not expect anything to come). Please, proceed as usual
(either to v5.10 or to v5.11 cycle, there is not much difference b/c
culptin is sitting in v5.9).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1] pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request
2020-12-07 17:59 [PATCH v1] pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request Andy Shevchenko
2020-12-07 18:08 ` Andy Shevchenko
@ 2020-12-07 18:16 ` Mika Westerberg
2020-12-07 21:52 ` Pierre-Louis Bossart
2020-12-08 0:56 ` Kai-Heng Feng
2 siblings, 1 reply; 10+ messages in thread
From: Mika Westerberg @ 2020-12-07 18:16 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-gpio, Linus Walleij, Pierre-Louis Bossart
On Mon, Dec 07, 2020 at 07:59:40PM +0200, Andy Shevchenko wrote:
> Mistakenly the buffers (input and output) become together enabled for a little
> period of time during GPIO request. This is problematic, because instead of
> initial motive to disable them in the commit af7e3eeb84e2
> ("pinctrl: intel: Disable input and output buffer when switching to GPIO"),
> the driven value on the pin, which might be used as an IRQ line, brings
> firmware of some touch pads in an awkward state that needs a full power off
> to recover. Fix this by, as stated in a culprit commit, disabling the buffers.
>
> Fixes: af7e3eeb84e2 ("pinctrl: intel: Disable input and output buffer when switching to GPIO")
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210497
> Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1] pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request
2020-12-07 18:16 ` Mika Westerberg
@ 2020-12-07 21:52 ` Pierre-Louis Bossart
0 siblings, 0 replies; 10+ messages in thread
From: Pierre-Louis Bossart @ 2020-12-07 21:52 UTC (permalink / raw)
To: Mika Westerberg, Andy Shevchenko; +Cc: linux-gpio, Linus Walleij
On 12/7/20 12:16 PM, Mika Westerberg wrote:
> On Mon, Dec 07, 2020 at 07:59:40PM +0200, Andy Shevchenko wrote:
>> Mistakenly the buffers (input and output) become together enabled for a little
>> period of time during GPIO request. This is problematic, because instead of
>> initial motive to disable them in the commit af7e3eeb84e2
>> ("pinctrl: intel: Disable input and output buffer when switching to GPIO"),
>> the driven value on the pin, which might be used as an IRQ line, brings
>> firmware of some touch pads in an awkward state that needs a full power off
>> to recover. Fix this by, as stated in a culprit commit, disabling the buffers.
>>
>> Fixes: af7e3eeb84e2 ("pinctrl: intel: Disable input and output buffer when switching to GPIO")
>> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210497
>> Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
On the initial device where I reported the problem, and with the battery
disconnected to make sure there's no EC issue, this patch restores the
touchpad functionality.
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1] pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request
2020-12-07 17:59 [PATCH v1] pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request Andy Shevchenko
2020-12-07 18:08 ` Andy Shevchenko
2020-12-07 18:16 ` Mika Westerberg
@ 2020-12-08 0:56 ` Kai-Heng Feng
2 siblings, 0 replies; 10+ messages in thread
From: Kai-Heng Feng @ 2020-12-08 0:56 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Mika Westerberg, linux-gpio, Linus Walleij, Pierre-Louis Bossart
> On Dec 8, 2020, at 01:59, Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
>
> Mistakenly the buffers (input and output) become together enabled for a little
> period of time during GPIO request. This is problematic, because instead of
> initial motive to disable them in the commit af7e3eeb84e2
> ("pinctrl: intel: Disable input and output buffer when switching to GPIO"),
> the driven value on the pin, which might be used as an IRQ line, brings
> firmware of some touch pads in an awkward state that needs a full power off
> to recover. Fix this by, as stated in a culprit commit, disabling the buffers.
>
> Fixes: af7e3eeb84e2 ("pinctrl: intel: Disable input and output buffer when switching to GPIO")
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210497
> Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
> drivers/pinctrl/intel/pinctrl-intel.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
> index e77145e3b31b..5cd720f5b0e1 100644
> --- a/drivers/pinctrl/intel/pinctrl-intel.c
> +++ b/drivers/pinctrl/intel/pinctrl-intel.c
> @@ -452,8 +452,8 @@ static void intel_gpio_set_gpio_mode(void __iomem *padcfg0)
> value |= PADCFG0_PMODE_GPIO;
>
> /* Disable input and output buffers */
> - value &= ~PADCFG0_GPIORXDIS;
> - value &= ~PADCFG0_GPIOTXDIS;
> + value |= PADCFG0_GPIORXDIS;
> + value |= PADCFG0_GPIOTXDIS;
>
> /* Disable SCI/SMI/NMI generation */
> value &= ~(PADCFG0_GPIROUTIOXAPIC | PADCFG0_GPIROUTSCI);
> --
> 2.29.2
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1] pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request
2020-12-07 18:08 ` Andy Shevchenko
@ 2020-12-08 8:34 ` Linus Walleij
2020-12-08 9:48 ` Andy Shevchenko
0 siblings, 1 reply; 10+ messages in thread
From: Linus Walleij @ 2020-12-08 8:34 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Andy Shevchenko, Mika Westerberg, open list:GPIO SUBSYSTEM,
Pierre-Louis Bossart
On Mon, Dec 7, 2020 at 7:07 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Mon, Dec 7, 2020 at 8:02 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > Mistakenly the buffers (input and output) become together enabled for a little
> > period of time during GPIO request. This is problematic, because instead of
> > initial motive to disable them in the commit af7e3eeb84e2
> > ("pinctrl: intel: Disable input and output buffer when switching to GPIO"),
> > the driven value on the pin, which might be used as an IRQ line, brings
> > firmware of some touch pads in an awkward state that needs a full power off
> > to recover. Fix this by, as stated in a culprit commit, disabling the buffers.
>
> Linus, since we are at rc7 I'm not going to send a PR for this single
> fix (I truly do not expect anything to come). Please, proceed as usual
> (either to v5.10 or to v5.11 cycle, there is not much difference b/c
> culptin is sitting in v5.9).
OK no problem, I applied the patch directly for fixes so we get it in ASAP.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1] pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request
2020-12-08 8:34 ` Linus Walleij
@ 2020-12-08 9:48 ` Andy Shevchenko
2020-12-08 9:50 ` Andy Shevchenko
2020-12-08 15:38 ` Linus Walleij
0 siblings, 2 replies; 10+ messages in thread
From: Andy Shevchenko @ 2020-12-08 9:48 UTC (permalink / raw)
To: Linus Walleij
Cc: Mika Westerberg, open list:GPIO SUBSYSTEM, Pierre-Louis Bossart
On Tue, Dec 08, 2020 at 09:34:43AM +0100, Linus Walleij wrote:
> On Mon, Dec 7, 2020 at 7:07 PM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > On Mon, Dec 7, 2020 at 8:02 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > >
> > > Mistakenly the buffers (input and output) become together enabled for a little
> > > period of time during GPIO request. This is problematic, because instead of
> > > initial motive to disable them in the commit af7e3eeb84e2
> > > ("pinctrl: intel: Disable input and output buffer when switching to GPIO"),
> > > the driven value on the pin, which might be used as an IRQ line, brings
> > > firmware of some touch pads in an awkward state that needs a full power off
> > > to recover. Fix this by, as stated in a culprit commit, disabling the buffers.
> >
> > Linus, since we are at rc7 I'm not going to send a PR for this single
> > fix (I truly do not expect anything to come). Please, proceed as usual
> > (either to v5.10 or to v5.11 cycle, there is not much difference b/c
> > culptin is sitting in v5.9).
>
> OK no problem, I applied the patch directly for fixes so we get it in ASAP.
Linus, thanks, however something happened to it. i.e. BugLink tag disappeared.
It's not good, because due to that link and Kai's report I quickly understood
what was the issue.
Besides that commit message has some grammar / style issues.
Can you please fix above and use below (fixed) text as commit message?
---8<---8<---
Mistakenly the buffers (input and output) become together enabled for a short
period of time during GPIO request. This is problematic, because instead of
initial motive to disable them in the commit af7e3eeb84e2
("pinctrl: intel: Disable input and output buffer when switching to GPIO"),
the driven value on the pin, which might be used as an IRQ line, brings
firmwares of some touch pads to an awkward state that needs a full power off
to recover. Fix this by, as stated in the culprit commit, disabling the buffers.
P.S. I'm looking at 5f4592bc20c8 in your pin control tree, fixes branch.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1] pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request
2020-12-08 9:48 ` Andy Shevchenko
@ 2020-12-08 9:50 ` Andy Shevchenko
2020-12-08 18:25 ` Andy Shevchenko
2020-12-08 15:38 ` Linus Walleij
1 sibling, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2020-12-08 9:50 UTC (permalink / raw)
To: Linus Walleij
Cc: Mika Westerberg, open list:GPIO SUBSYSTEM, Pierre-Louis Bossart
On Tue, Dec 08, 2020 at 11:48:53AM +0200, Andy Shevchenko wrote:
> On Tue, Dec 08, 2020 at 09:34:43AM +0100, Linus Walleij wrote:
> > On Mon, Dec 7, 2020 at 7:07 PM Andy Shevchenko
> > <andy.shevchenko@gmail.com> wrote:
> > > On Mon, Dec 7, 2020 at 8:02 PM Andy Shevchenko
> > > <andriy.shevchenko@linux.intel.com> wrote:
...
> > > Linus, since we are at rc7 I'm not going to send a PR for this single
> > > fix (I truly do not expect anything to come). Please, proceed as usual
> > > (either to v5.10 or to v5.11 cycle, there is not much difference b/c
> > > culptin is sitting in v5.9).
> >
> > OK no problem, I applied the patch directly for fixes so we get it in ASAP.
>
> Linus, thanks, however something happened to it. i.e. BugLink tag disappeared.
> It's not good, because due to that link and Kai's report I quickly understood
> what was the issue.
>
> Besides that commit message has some grammar / style issues.
> Can you please fix above and use below (fixed) text as commit message?
>
> ---8<---8<---
>
> Mistakenly the buffers (input and output) become together enabled for a short
> period of time during GPIO request. This is problematic, because instead of
> initial motive to disable them in the commit af7e3eeb84e2
> ("pinctrl: intel: Disable input and output buffer when switching to GPIO"),
> the driven value on the pin, which might be used as an IRQ line, brings
> firmwares of some touch pads to an awkward state that needs a full power off
> to recover. Fix this by, as stated in the culprit commit, disabling the buffers.
>
> P.S. I'm looking at 5f4592bc20c8 in your pin control tree, fixes branch.
I can send a v2 for your convenience.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1] pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request
2020-12-08 9:48 ` Andy Shevchenko
2020-12-08 9:50 ` Andy Shevchenko
@ 2020-12-08 15:38 ` Linus Walleij
1 sibling, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2020-12-08 15:38 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Mika Westerberg, open list:GPIO SUBSYSTEM, Pierre-Louis Bossart
On Tue, Dec 8, 2020 at 10:47 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> Linus, thanks, however something happened to it. i.e. BugLink tag disappeared.
> It's not good, because due to that link and Kai's report I quickly understood
> what was the issue.
Oh I think that is an issue with the b4 tool that I use to extract patches.
It was reported some time back and might not be fixed in the version
I'm running.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1] pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request
2020-12-08 9:50 ` Andy Shevchenko
@ 2020-12-08 18:25 ` Andy Shevchenko
0 siblings, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2020-12-08 18:25 UTC (permalink / raw)
To: Linus Walleij
Cc: Mika Westerberg, open list:GPIO SUBSYSTEM, Pierre-Louis Bossart
On Tue, Dec 08, 2020 at 11:50:13AM +0200, Andy Shevchenko wrote:
> On Tue, Dec 08, 2020 at 11:48:53AM +0200, Andy Shevchenko wrote:
...
> I can send a v2 for your convenience.
v2 has been sent.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-12-08 18:25 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-07 17:59 [PATCH v1] pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request Andy Shevchenko
2020-12-07 18:08 ` Andy Shevchenko
2020-12-08 8:34 ` Linus Walleij
2020-12-08 9:48 ` Andy Shevchenko
2020-12-08 9:50 ` Andy Shevchenko
2020-12-08 18:25 ` Andy Shevchenko
2020-12-08 15:38 ` Linus Walleij
2020-12-07 18:16 ` Mika Westerberg
2020-12-07 21:52 ` Pierre-Louis Bossart
2020-12-08 0:56 ` Kai-Heng Feng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.