All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andy.shevchenko@gmail.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:00:34 +0100	[thread overview]
Message-ID: <6a8a246b-1b11-f569-b495-6440e70fc121@redhat.com> (raw)
In-Reply-To: <CAHp75VdYhe4YEAzULMNkhihTQwHAP3fC2F6iD=datqzyzd=4fQ@mail.gmail.com>

Hi,

On 11/3/20 11:49 AM, Andy Shevchenko wrote:
> 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

You are completely right, my bad.

> [1]: https://en.wikipedia.org/wiki/Real-time_clock
> (just google: rtc clock frequency)

I did duckduckgo, but one of the first hits said 32KHz crystal and
I assumed that meant 32.000 KHz falling into the exact precision
trap I was complaining about in my previous email, oops.

Regards,

Hans



WARNING: multiple messages have this Message-ID (diff)
From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Coiby Xu <coiby.xu@gmail.com>, wang jun <availa@outlook.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	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, 3 Nov 2020 12:00:34 +0100	[thread overview]
Message-ID: <6a8a246b-1b11-f569-b495-6440e70fc121@redhat.com> (raw)
In-Reply-To: <CAHp75VdYhe4YEAzULMNkhihTQwHAP3fC2F6iD=datqzyzd=4fQ@mail.gmail.com>

Hi,

On 11/3/20 11:49 AM, Andy Shevchenko wrote:
> 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

You are completely right, my bad.

> [1]: https://en.wikipedia.org/wiki/Real-time_clock
> (just google: rtc clock frequency)

I did duckduckgo, but one of the first hits said 32KHz crystal and
I assumed that meant 32.000 KHz falling into the exact precision
trap I was complaining about in my previous email, oops.

Regards,

Hans


_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  reply	other threads:[~2020-11-03 11:00 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 [this message]
2020-11-03 11:00                                                 ` 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
2020-10-06  9:16                             ` [Linux-kernel-mentees] " 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=6a8a246b-1b11-f569-b495-6440e70fc121@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=Nehal-bakulchandra.Shah@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=availa@outlook.com \
    --cc=coiby.xu@gmail.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 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.