From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60BF9C2D0A3 for ; Tue, 3 Nov 2020 10:48:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 01A18223BD for ; Tue, 3 Nov 2020 10:48:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qpi63dg6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727479AbgKCKsV (ORCPT ); Tue, 3 Nov 2020 05:48:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726058AbgKCKsV (ORCPT ); Tue, 3 Nov 2020 05:48:21 -0500 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F6C8C0613D1 for ; Tue, 3 Nov 2020 02:48:21 -0800 (PST) Received: by mail-pf1-x430.google.com with SMTP id e7so13815816pfn.12 for ; Tue, 03 Nov 2020 02:48:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rKa+JgzadxzWS3bdsoFXKOpjwWVP8DbpJnaCBUt14mo=; b=qpi63dg6RuLyzF9O47QcF7vcoiD+4QFUfxKAw8oKDqOaSdbinO/wT6qcAcQdnoWd4Z 7sG1u23gZWuG9RC0vn6yrrHtnoWfhqPfnzB2NIKwKnup3D0p1qiWYqv9sMf3gikX0aJN vVRmftQqrce7TX4H30ZyqMcXwRyKd58ia9q8QL/iYhLtdj63q7HkOEFwCwXPldpgYoz3 IjubeWJ85dG8h5TEfloxM/AZee178RiKZCGmtt+uO25ehGFMZnrmkasq8LqTS5P7SUKc sZV3JlEIFmYGSBI6M4tLTKCilw1LEmaF8hzn2BtfgsbzDeWgKzisjWJJHjSuGqru6iVd mNDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rKa+JgzadxzWS3bdsoFXKOpjwWVP8DbpJnaCBUt14mo=; b=UWbO+lvewBJkWK4pFVU5odoHQOGYX+9nraGFbZfprKXMiUX7D+Xdbk2hIRzONmpWIY HJNd5IglI4Jj1+w9Cc3Z+lbljOoBdXoUAWF1k5ATte5Bwy5Yr3ee06foJXnbvglAmx6I QXkZMwd61AXNS+Ov+mFWhNMi18gvRVcC/jOkODyMPCGoW3aNom9tA+u4jrCBPZ04KWkE dzYDGImicNWVVFW2QnE2OY/4oTPGiE4qn2EBFBARyJdCqv6WnwGjg7TWvGq98Zq33cpK UTuu1KAPZmzC+tZZh/2DaaI1NG0g8g7to/0UQxN+b17Cz0FYu0ISCYtiPr2ZFd5Ee/sM pOPA== X-Gm-Message-State: AOAM533771sJBRdmT+0AQluEKml504h/Oo7lvNLr4X4soJQMNcgPQoBS Z+tr31hkenCkHuGAQIBSeUiOhwV3T5dnXO6w1ujegv+ifQ40Rg== X-Google-Smtp-Source: ABdhPJxMkcNLPT3Yz759qyIzP/3KsBKciOfH87QdigzUYnNTt8Typ2gcfJpVpSv32xsCNO6oLRV2+1eYYd0se9avpSo= X-Received: by 2002:a63:4511:: with SMTP id s17mr9135338pga.4.1604400500661; Tue, 03 Nov 2020 02:48:20 -0800 (PST) MIME-Version: 1.0 References: <20201006044941.fdjsp346kc5thyzy@Rk> <20201006083157.3pg6zvju5buxspns@Rk> <69853d2b-239c-79d5-bf6f-7dc0eec65602@redhat.com> <4f02cbdf-e1dd-b138-4975-118dd4f86089@redhat.com> <20201014042420.fkkyabmrkiekpmfw@Rk> <20201026225400.37almqey2wxyazkn@Rk> <20201103000507.ufzukd2vkb5h2e3b@Rk> <2f4706a1-502f-75f0-9596-cc25b4933b6c@redhat.com> In-Reply-To: <2f4706a1-502f-75f0-9596-cc25b4933b6c@redhat.com> From: Andy Shevchenko Date: Tue, 3 Nov 2020 12:49:09 +0200 Message-ID: Subject: Re: Any other ways to debug GPIO interrupt controller (pinctrl-amd) for broken touchpads of a new laptop model? To: Hans de Goede Cc: Coiby Xu , Linus Walleij , "open list:GPIO SUBSYSTEM" , wang jun , Nehal Shah , Shyam Sundar S K , linux-kernel-mentees@lists.linuxfoundation.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Tue, Nov 3, 2020 at 12:12 PM Hans de Goede 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7CFEC388F2 for ; Tue, 3 Nov 2020 10:48:26 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 595DB22384 for ; Tue, 3 Nov 2020 10:48:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qpi63dg6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 595DB22384 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C6EE18711B; Tue, 3 Nov 2020 10:48:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1Ce5zmj0KKCS; Tue, 3 Nov 2020 10:48:23 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 13CBF8718D; Tue, 3 Nov 2020 10:48:23 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0CFDCC0889; Tue, 3 Nov 2020 10:48:23 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id F0C09C0051 for ; Tue, 3 Nov 2020 10:48:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D84B2870E8 for ; Tue, 3 Nov 2020 10:48:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yruLe7d5530H for ; Tue, 3 Nov 2020 10:48:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by whitealder.osuosl.org (Postfix) with ESMTPS id 2480D8701C for ; Tue, 3 Nov 2020 10:48:21 +0000 (UTC) Received: by mail-pf1-f181.google.com with SMTP id w65so13862646pfd.3 for ; Tue, 03 Nov 2020 02:48:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rKa+JgzadxzWS3bdsoFXKOpjwWVP8DbpJnaCBUt14mo=; b=qpi63dg6RuLyzF9O47QcF7vcoiD+4QFUfxKAw8oKDqOaSdbinO/wT6qcAcQdnoWd4Z 7sG1u23gZWuG9RC0vn6yrrHtnoWfhqPfnzB2NIKwKnup3D0p1qiWYqv9sMf3gikX0aJN vVRmftQqrce7TX4H30ZyqMcXwRyKd58ia9q8QL/iYhLtdj63q7HkOEFwCwXPldpgYoz3 IjubeWJ85dG8h5TEfloxM/AZee178RiKZCGmtt+uO25ehGFMZnrmkasq8LqTS5P7SUKc sZV3JlEIFmYGSBI6M4tLTKCilw1LEmaF8hzn2BtfgsbzDeWgKzisjWJJHjSuGqru6iVd mNDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rKa+JgzadxzWS3bdsoFXKOpjwWVP8DbpJnaCBUt14mo=; b=KxUJvs6l6jO7adeRzgHOUN7e2ofz1f9R1cRoA7psrJMkWvOk0HItpX/F2M/s1vZA+i IRtsFzK6L96d+PVSKXPPcnStMrR5Fm5Vu9p/GIsS4PT77bRyjs1u5tqSFKO4QsbkhFLf T6NWFNoknwtfJTO3vojR10wZbdUj+13PUU83dEJpUv9fndJfUnjLI5naa/oXf8llZsXI efu2SI+uwZhMpOAYImN9jyit3ocD2pg870Oeq5NzdPS1Nq3H8EQXDSwM6w6IYVIJdTU+ mW0OVB5UYlTXv8Dz6Q/AmoriAJP2p6w0+1T+sfoCxM3hGLS+KQmEGBFxE6AbQn7jh4kN jk7w== X-Gm-Message-State: AOAM533xhnDMw+fEa+6yZC+HkJUOqdO5TwRLGSX1ncFOSPt/WvEUcqoJ miCnEvcP0Ve4UsQ4D1EAGK+89gzwiePcGhSOjuo= X-Google-Smtp-Source: ABdhPJxMkcNLPT3Yz759qyIzP/3KsBKciOfH87QdigzUYnNTt8Typ2gcfJpVpSv32xsCNO6oLRV2+1eYYd0se9avpSo= X-Received: by 2002:a63:4511:: with SMTP id s17mr9135338pga.4.1604400500661; Tue, 03 Nov 2020 02:48:20 -0800 (PST) MIME-Version: 1.0 References: <20201006044941.fdjsp346kc5thyzy@Rk> <20201006083157.3pg6zvju5buxspns@Rk> <69853d2b-239c-79d5-bf6f-7dc0eec65602@redhat.com> <4f02cbdf-e1dd-b138-4975-118dd4f86089@redhat.com> <20201014042420.fkkyabmrkiekpmfw@Rk> <20201026225400.37almqey2wxyazkn@Rk> <20201103000507.ufzukd2vkb5h2e3b@Rk> <2f4706a1-502f-75f0-9596-cc25b4933b6c@redhat.com> In-Reply-To: <2f4706a1-502f-75f0-9596-cc25b4933b6c@redhat.com> From: Andy Shevchenko Date: Tue, 3 Nov 2020 12:49:09 +0200 Message-ID: To: Hans de Goede Cc: Shyam Sundar S K , Linus Walleij , Coiby Xu , wang jun , "open list:GPIO SUBSYSTEM" , linux-kernel-mentees@lists.linuxfoundation.org, Nehal Shah Subject: Re: [Linux-kernel-mentees] Any other ways to debug GPIO interrupt controller (pinctrl-amd) for broken touchpads of a new laptop model? X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" On Tue, Nov 3, 2020 at 12:12 PM Hans de Goede 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 _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees