From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Coiby Xu <coiby.xu@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
"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 12:49:09 +0200 [thread overview]
Message-ID: <CAHp75VdYhe4YEAzULMNkhihTQwHAP3fC2F6iD=datqzyzd=4fQ@mail.gmail.com> (raw)
In-Reply-To: <2f4706a1-502f-75f0-9596-cc25b4933b6c@redhat.com>
On Tue, Nov 3, 2020 at 12:12 PM Hans de Goede <hdegoede@redhat.com> wrote:
> On 11/3/20 1:05 AM, Coiby Xu wrote:
> > On Tue, Oct 27, 2020 at 11:09:11AM +0100, Hans de Goede wrote:
...
> > [1] https://lore.kernel.org/patchwork/comment/1522675/
>
> This is a case where Andy is obviously right and you should just use the
> higher precision "unit = 15625" value (except probably that is wrong too,
> see below).
>
> We have had similar issues with the docs for getting the TSC frequency
> on some Intel chips, where the docs said 16.6 MHz for a certain register
> value, where what they meant was 100/6 MHz which really is significantly
> different. This was leading to a time drift of 5 minutes / day on non
> networked (so no NTP) Linux systems.
>
> I think this is what Andy was referring to when he wrote:
> "What the heck with HW companies! (Just an emotion based on the experience)"
Exactly!
...
> Actually all the values look somewhat suspect. The comment:
>
> > Debounce Debounce Timer Max
> > TmrLarge TmrOutUnit Unit Debounce
> > Time
> > 0 0 61 usec (2 RtcClk) 976 usec
> > 0 1 244 usec (8 RtcClk) 3.9 msec
> > 1 0 15.6 msec (512 RtcClk) 250 msec
> > 1 1 62.5 msec (2048 RtcClk) 1 sec
>
> Helpfully gives the values in RtcClks. A typical RTC clock crystal
> is 32 KHz which gives us 31.25 usec per tick, so I would expect the
> values to be:
I guess you are mistaken here. Usual frequency for RTC is 32.768kHz
[1], which gives more or less above values
30.51757
61.03515
244.14062
15625
62500
[1]: https://en.wikipedia.org/wiki/Real-time_clock
(just google: rtc clock frequency)
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2020-11-03 10:48 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
2020-11-03 10:12 ` Hans de Goede
2020-11-03 10:49 ` Andy Shevchenko [this message]
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='CAHp75VdYhe4YEAzULMNkhihTQwHAP3fC2F6iD=datqzyzd=4fQ@mail.gmail.com' \
--to=andy.shevchenko@gmail.com \
--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=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).