From: Coiby Xu <coiby.xu@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Andy Shevchenko <andy.shevchenko@gmail.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, 3 Nov 2020 08:05:07 +0800 [thread overview]
Message-ID: <20201103000507.ufzukd2vkb5h2e3b@Rk> (raw)
In-Reply-To: <f15806d6-32e2-c6b0-8f96-670a196380a8@redhat.com>
On Tue, Oct 27, 2020 at 11:09:11AM +0100, Hans de Goede wrote:
>Hi,
>
...
>
>So I see 2 ways to move forward with his:
>
>1. Just disable the debounce filter for level type IRQs; or
>2. Add a helper to sanitize the debounce pulse-duration setting and
> call that when setting the IRQ type.
> This helper would read the setting check it is not crazy long for
> an IRQ-line (lets say anything above 1 ms is crazy long) and if it
> is crazy long then overwrite it with a saner value.
>
>2. is a bit tricky, because if the IRQ line comes from a chip then
>obviously max 1ms debouncing to catch eletrical interference should be
>fine. But sometimes cheap buttons for things like volume up/down on tablets
>are directly connected to GPIOs and then we may want longer debouncing...
>
>So if we do 2. we may want to limit it to only level type IRQs too.
>
>Note I have contacted AMD about this and asked them for some input on this,
>ideally they can tell us how exactly we should program the debounce filter
>and based on which data we should do that.
Is there any update from AMD? Based on the discussion, I'm going to
submit a patch to disable debounce filter for both level and edge
type IRQs, i.e. to remove relevant code in amd_gpio_irq_set_type of
drivers/pinctrl/pinctrl-amd.c since setting debounce filter is
orthogonal to setting irq type and Andy has submitted the patch to
support setting debounce setting supplied by ACPI in gpiolib-acpi.c
Btw, did you contact AMD through a representative? Obviously CC them
didn't get their attention. There is an inconsistency for configuring
debounce timeout in pinctrl-amd as was spotted by Andy [1]. I also need
their feedback for this matter.
[1] https://lore.kernel.org/patchwork/comment/1522675/
>
>Regards,
>
>Hans
>
--
Best regards,
Coiby
next prev parent reply other threads:[~2020-11-03 0:05 UTC|newest]
Thread overview: 42+ 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 20:57 ` Linus Walleij
2020-10-02 9:40 ` Hans de Goede
2020-10-02 12:42 ` Coiby Xu
2020-10-02 13:36 ` Hans de Goede
2020-10-02 14:51 ` Coiby Xu
2020-10-02 19:44 ` Hans de Goede
2020-10-02 22:45 ` Coiby Xu
2020-10-03 13:22 ` Hans de Goede
2020-10-03 23:03 ` Coiby Xu
2020-10-04 5:16 ` Coiby Xu
2020-10-06 4:49 ` Coiby Xu
2020-10-06 6:28 ` Hans de Goede
2020-10-06 8:31 ` Coiby Xu
2020-10-06 8:55 ` Hans de Goede
2020-10-06 9:28 ` Hans de Goede
2020-10-06 9:29 ` Hans de Goede
2020-10-08 16:32 ` Coiby Xu
2020-10-14 4:24 ` Coiby Xu
2020-10-14 11:34 ` Coiby Xu
2020-10-14 11:46 ` Hans de Goede
2020-10-15 3:27 ` Coiby Xu
2020-10-15 4:06 ` Coiby Xu
2020-10-26 22:54 ` Coiby Xu
2020-10-27 9:52 ` Andy Shevchenko
2020-10-30 4:58 ` Coiby Xu
2020-10-27 10:09 ` Hans de Goede
2020-10-27 15:13 ` Andy Shevchenko
2020-10-27 16:00 ` Hans de Goede
2020-10-27 16:09 ` Andy Shevchenko
2020-10-29 8:04 ` Mika Westerberg
2020-10-30 4:54 ` Coiby Xu
2020-11-02 19:06 ` Andy Shevchenko
2020-11-02 22:56 ` Coiby Xu
2020-11-03 0:05 ` Coiby Xu [this message]
2020-11-03 10:12 ` Hans de Goede
2020-11-03 10:49 ` Andy Shevchenko
2020-11-03 11:00 ` Hans de Goede
2020-10-08 16:26 ` Coiby Xu
2020-10-06 9:16 ` Linus Walleij
2020-10-08 16:40 ` Coiby Xu
2020-10-02 10:59 ` 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=20201103000507.ufzukd2vkb5h2e3b@Rk \
--to=coiby.xu@gmail.com \
--cc=Nehal-bakulchandra.Shah@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=andy.shevchenko@gmail.com \
--cc=availa@outlook.com \
--cc=hdegoede@redhat.com \
--cc=linus.walleij@linaro.org \
--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: 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).