From: Linus Walleij <linus.walleij@linaro.org> To: Coiby Xu <coiby.xu@gmail.com> Cc: Hans de Goede <hdegoede@redhat.com>, "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>, wang jun <availa@outlook.com>, Nehal Shah <Nehal-bakulchandra.Shah@amd.com>, Shyam Sundar S K <Shyam-sundar.S-k@amd.com>, linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: Any other ways to debug GPIO interrupt controller (pinctrl-amd) for broken touchpads of a new laptop model? Date: Tue, 6 Oct 2020 11:16:50 +0200 [thread overview] Message-ID: <CACRpkdaK-WpQdKu-tBOyvB1HLZ10ivjEPrVFqGjPSvLJuPXG8Q@mail.gmail.com> (raw) In-Reply-To: <20201006083157.3pg6zvju5buxspns@Rk> On Tue, Oct 6, 2020 at 10:32 AM Coiby Xu <coiby.xu@gmail.com> wrote: > Disabling the glitch filter works like a charm! Other enthusiastic > Linux users who have been troubled by this issue for months would > also feel great to know this small tweaking could bring their > touchpad back to life:) Thank you! Oh you found the bug :D > $ git diff > diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c > index 9a760f5cd7ed..e786d779d6c8 100644 > --- a/drivers/pinctrl/pinctrl-amd.c > +++ b/drivers/pinctrl/pinctrl-amd.c > @@ -463,7 +463,7 @@ static int amd_gpio_irq_set_type(struct irq_data *d, unsigned int type) > pin_reg &= ~(ACTIVE_LEVEL_MASK << ACTIVE_LEVEL_OFF); > pin_reg |= ACTIVE_LOW << ACTIVE_LEVEL_OFF; > pin_reg &= ~(DB_CNTRl_MASK << DB_CNTRL_OFF); > - pin_reg |= DB_TYPE_PRESERVE_HIGH_GLITCH << DB_CNTRL_OFF; > + /** pin_reg |= DB_TYPE_PRESERVE_HIGH_GLITCH << DB_CNTRL_OFF; */ > irq_set_handler_locked(d, handle_level_irq); > break; > > I will learn more about the glitch filter and the implementation of > pinctrl and see if I can disable glitch filter only for this touchpad. Yes we certainly need a quirk for this of some kind, examine the ACPI quirk infrastructure in drivers/gpio/gpiolib-acpi.c to see if you can use that to handle this. Yours, Linus Walleij
WARNING: multiple messages have this Message-ID (diff)
From: Linus Walleij <linus.walleij@linaro.org> To: Coiby Xu <coiby.xu@gmail.com> Cc: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>, "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>, wang jun <availa@outlook.com>, Hans de Goede <hdegoede@redhat.com>, linux-kernel-mentees@lists.linuxfoundation.org, Nehal Shah <Nehal-bakulchandra.Shah@amd.com> Subject: Re: [Linux-kernel-mentees] Any other ways to debug GPIO interrupt controller (pinctrl-amd) for broken touchpads of a new laptop model? Date: Tue, 6 Oct 2020 11:16:50 +0200 [thread overview] Message-ID: <CACRpkdaK-WpQdKu-tBOyvB1HLZ10ivjEPrVFqGjPSvLJuPXG8Q@mail.gmail.com> (raw) In-Reply-To: <20201006083157.3pg6zvju5buxspns@Rk> On Tue, Oct 6, 2020 at 10:32 AM Coiby Xu <coiby.xu@gmail.com> wrote: > Disabling the glitch filter works like a charm! Other enthusiastic > Linux users who have been troubled by this issue for months would > also feel great to know this small tweaking could bring their > touchpad back to life:) Thank you! Oh you found the bug :D > $ git diff > diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c > index 9a760f5cd7ed..e786d779d6c8 100644 > --- a/drivers/pinctrl/pinctrl-amd.c > +++ b/drivers/pinctrl/pinctrl-amd.c > @@ -463,7 +463,7 @@ static int amd_gpio_irq_set_type(struct irq_data *d, unsigned int type) > pin_reg &= ~(ACTIVE_LEVEL_MASK << ACTIVE_LEVEL_OFF); > pin_reg |= ACTIVE_LOW << ACTIVE_LEVEL_OFF; > pin_reg &= ~(DB_CNTRl_MASK << DB_CNTRL_OFF); > - pin_reg |= DB_TYPE_PRESERVE_HIGH_GLITCH << DB_CNTRL_OFF; > + /** pin_reg |= DB_TYPE_PRESERVE_HIGH_GLITCH << DB_CNTRL_OFF; */ > irq_set_handler_locked(d, handle_level_irq); > break; > > I will learn more about the glitch filter and the implementation of > pinctrl and see if I can disable glitch filter only for this touchpad. Yes we certainly need a quirk for this of some kind, examine the ACPI quirk infrastructure in drivers/gpio/gpiolib-acpi.c to see if you can use that to handle this. Yours, Linus Walleij _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
next prev parent reply other threads:[~2020-10-06 9:17 UTC|newest] Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-01 13:22 Any other ways to debug GPIO interrupt controller (pinctrl-amd) for broken touchpads of a new laptop model? Coiby Xu 2020-10-01 13:22 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-01 20:57 ` Linus Walleij 2020-10-01 20:57 ` [Linux-kernel-mentees] " Linus Walleij 2020-10-02 9:40 ` Hans de Goede 2020-10-02 9:40 ` [Linux-kernel-mentees] " Hans de Goede 2020-10-02 12:42 ` Coiby Xu 2020-10-02 12:42 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-02 13:36 ` Hans de Goede 2020-10-02 13:36 ` [Linux-kernel-mentees] " Hans de Goede 2020-10-02 14:51 ` Coiby Xu 2020-10-02 14:51 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-02 19:44 ` Hans de Goede 2020-10-02 19:44 ` [Linux-kernel-mentees] " Hans de Goede 2020-10-02 22:45 ` Coiby Xu 2020-10-02 22:45 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-03 13:22 ` Hans de Goede 2020-10-03 13:22 ` [Linux-kernel-mentees] " Hans de Goede 2020-10-03 23:03 ` Coiby Xu 2020-10-03 23:03 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-04 5:16 ` Coiby Xu 2020-10-04 5:16 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-06 4:49 ` Coiby Xu 2020-10-06 4:49 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-06 6:28 ` Hans de Goede 2020-10-06 6:28 ` [Linux-kernel-mentees] " Hans de Goede 2020-10-06 8:31 ` Coiby Xu 2020-10-06 8:31 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-06 8:55 ` Hans de Goede 2020-10-06 8:55 ` [Linux-kernel-mentees] " Hans de Goede 2020-10-06 9:28 ` Hans de Goede 2020-10-06 9:28 ` [Linux-kernel-mentees] " Hans de Goede 2020-10-06 9:29 ` Hans de Goede 2020-10-06 9:29 ` [Linux-kernel-mentees] " Hans de Goede 2020-10-08 16:32 ` Coiby Xu 2020-10-08 16:32 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-14 4:24 ` Coiby Xu 2020-10-14 4:24 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-14 11:34 ` Coiby Xu 2020-10-14 11:34 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-14 11:46 ` Hans de Goede 2020-10-14 11:46 ` [Linux-kernel-mentees] " Hans de Goede 2020-10-15 3:27 ` Coiby Xu 2020-10-15 3:27 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-15 4:06 ` Coiby Xu 2020-10-15 4:06 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-26 22:54 ` Coiby Xu 2020-10-26 22:54 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-27 9:52 ` Andy Shevchenko 2020-10-27 9:52 ` [Linux-kernel-mentees] " Andy Shevchenko 2020-10-30 4:58 ` Coiby Xu 2020-10-30 4:58 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-27 10:09 ` Hans de Goede 2020-10-27 10:09 ` [Linux-kernel-mentees] " Hans de Goede 2020-10-27 15:13 ` Andy Shevchenko 2020-10-27 15:13 ` [Linux-kernel-mentees] " Andy Shevchenko 2020-10-27 16:00 ` Hans de Goede 2020-10-27 16:00 ` [Linux-kernel-mentees] " Hans de Goede 2020-10-27 16:09 ` Andy Shevchenko 2020-10-27 16:09 ` [Linux-kernel-mentees] " Andy Shevchenko 2020-10-29 8:04 ` Mika Westerberg 2020-10-29 8:04 ` [Linux-kernel-mentees] " Mika Westerberg 2020-10-30 4:54 ` Coiby Xu 2020-10-30 4:54 ` [Linux-kernel-mentees] " Coiby Xu 2020-11-02 19:06 ` Andy Shevchenko 2020-11-02 19:06 ` [Linux-kernel-mentees] " Andy Shevchenko 2020-11-02 22:56 ` Coiby Xu 2020-11-02 22:56 ` [Linux-kernel-mentees] " Coiby Xu 2020-11-03 0:05 ` Coiby Xu 2020-11-03 0:05 ` [Linux-kernel-mentees] " Coiby Xu 2020-11-03 10:12 ` Hans de Goede 2020-11-03 10:12 ` [Linux-kernel-mentees] " Hans de Goede 2020-11-03 10:49 ` Andy Shevchenko 2020-11-03 10:49 ` [Linux-kernel-mentees] " Andy Shevchenko 2020-11-03 11:00 ` Hans de Goede 2020-11-03 11:00 ` [Linux-kernel-mentees] " Hans de Goede 2020-10-08 16:26 ` Coiby Xu 2020-10-08 16:26 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-06 9:16 ` Linus Walleij [this message] 2020-10-06 9:16 ` Linus Walleij 2020-10-08 16:40 ` Coiby Xu 2020-10-08 16:40 ` [Linux-kernel-mentees] " Coiby Xu 2020-10-02 10:59 ` Coiby Xu 2020-10-02 10:59 ` [Linux-kernel-mentees] " Coiby Xu
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=CACRpkdaK-WpQdKu-tBOyvB1HLZ10ivjEPrVFqGjPSvLJuPXG8Q@mail.gmail.com \ --to=linus.walleij@linaro.org \ --cc=Nehal-bakulchandra.Shah@amd.com \ --cc=Shyam-sundar.S-k@amd.com \ --cc=availa@outlook.com \ --cc=coiby.xu@gmail.com \ --cc=hdegoede@redhat.com \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel-mentees@lists.linuxfoundation.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.