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=-5.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 B72C7C2D0A3 for ; Tue, 3 Nov 2020 11:00:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 50009208B6 for ; Tue, 3 Nov 2020 11:00:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VkgXF96d" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728169AbgKCLAl (ORCPT ); Tue, 3 Nov 2020 06:00:41 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:20078 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727742AbgKCLAl (ORCPT ); Tue, 3 Nov 2020 06:00:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604401239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4o15AbZ3fzzRBP1WGF4Ln3XoduoIEZnQEtzI6bpRkTQ=; b=VkgXF96d4iIimtUoWOWk5fmwBzr31sdmKzF01EKq6v7CtIvF9KCHeSyDYMNX0ZaEEaJj9/ jdRaKWo/u2v9+BVmig431tp9B5v0vA1lUBoa5YsVCCmDivicA1W65Ed7ZSAB2ZvJiRnGZ5 w2eyTbDatSDXf+MEc+9ZPWYXb5Da1YY= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-205-q7ZgTs9ONGyi6OGbYAEkIw-1; Tue, 03 Nov 2020 06:00:37 -0500 X-MC-Unique: q7ZgTs9ONGyi6OGbYAEkIw-1 Received: by mail-ej1-f71.google.com with SMTP id p19so5232960ejy.11 for ; Tue, 03 Nov 2020 03:00:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4o15AbZ3fzzRBP1WGF4Ln3XoduoIEZnQEtzI6bpRkTQ=; b=MD08U6qRGYzPzSp0g28g9B5b99vJD108tNja0XswAR4UXXnCEfgSnYixb8ZJLqA5PI 5vDGkuU8/jHg1RqrjqIix0KHD7b/vxqHsoXYByfYlAedyZl1/cVcMMlPH5YXKPzN3lUn 0nbizkYvaYz5WE1okGmDxv7nPJexpjo2OxS6DdyxlP3iy+RCzjy2yZ77yYfrjJl5hJbD 77mER3MRD/7X3aoiZQOlyYFLlx/AXaSyZIathIRNQ1/wdadmRP9oghwmNLKNTF9V1DRm KhC4esL5UT0pGLBcchpT8hglFDClXBvkZFszj5/GSrgLxPQb5LKRynfMp1CzWi5A3t9W e8FA== X-Gm-Message-State: AOAM530bMPjZAM63/ugULmJAY77EN+13ioxLg+hzXVORwLYCUaBYQOFD ZvwVtahaxb+QIZ/wOeERflBoD/wDYTHZYEecarbUEFu3xzyTTBK6V/DqOEsCqgqY6CR3NqMlgXt 4QD3tv+/9EhaB6kfJ/fxHDA== X-Received: by 2002:a17:906:38d8:: with SMTP id r24mr20090750ejd.32.1604401235716; Tue, 03 Nov 2020 03:00:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwoTWc0lQXkFflXZFy12IX1To15obznIM0owvbQRpO/sFj9xQr0nsFAtgQ3VglLSFX3nxtVeQ== X-Received: by 2002:a17:906:38d8:: with SMTP id r24mr20090714ejd.32.1604401235448; Tue, 03 Nov 2020 03:00:35 -0800 (PST) Received: from x1.localdomain (2001-1c00-0c0c-fe00-6c10-fbf3-14c4-884c.cable.dynamic.v6.ziggo.nl. [2001:1c00:c0c:fe00:6c10:fbf3:14c4:884c]) by smtp.gmail.com with ESMTPSA id sa23sm10746638ejb.80.2020.11.03.03.00.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Nov 2020 03:00:34 -0800 (PST) Subject: Re: Any other ways to debug GPIO interrupt controller (pinctrl-amd) for broken touchpads of a new laptop model? To: Andy Shevchenko Cc: Coiby Xu , Linus Walleij , "open list:GPIO SUBSYSTEM" , wang jun , Nehal Shah , Shyam Sundar S K , linux-kernel-mentees@lists.linuxfoundation.org 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> From: Hans de Goede Message-ID: <6a8a246b-1b11-f569-b495-6440e70fc121@redhat.com> Date: Tue, 3 Nov 2020 12:00:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Hi, On 11/3/20 11:49 AM, Andy Shevchenko wrote: > 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 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 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=-5.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 47FA0C2D0A3 for ; Tue, 3 Nov 2020 11:00:46 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 917DD208B6 for ; Tue, 3 Nov 2020 11:00:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VkgXF96d" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 917DD208B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.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 silver.osuosl.org (Postfix) with ESMTP id 120782075B; Tue, 3 Nov 2020 11:00:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q7KsRr9crMHY; Tue, 3 Nov 2020 11:00:44 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 096CE20527; Tue, 3 Nov 2020 11:00:44 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E452BC0889; Tue, 3 Nov 2020 11:00:43 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id BCD53C0051 for ; Tue, 3 Nov 2020 11:00:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9770787314 for ; Tue, 3 Nov 2020 11:00:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HxmydAZV2cn0 for ; Tue, 3 Nov 2020 11:00:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by hemlock.osuosl.org (Postfix) with ESMTPS id EE626872FB for ; Tue, 3 Nov 2020 11:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604401239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4o15AbZ3fzzRBP1WGF4Ln3XoduoIEZnQEtzI6bpRkTQ=; b=VkgXF96d4iIimtUoWOWk5fmwBzr31sdmKzF01EKq6v7CtIvF9KCHeSyDYMNX0ZaEEaJj9/ jdRaKWo/u2v9+BVmig431tp9B5v0vA1lUBoa5YsVCCmDivicA1W65Ed7ZSAB2ZvJiRnGZ5 w2eyTbDatSDXf+MEc+9ZPWYXb5Da1YY= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-44-1VZ_9dQgNoSqlEgcjPBVfA-1; Tue, 03 Nov 2020 06:00:37 -0500 X-MC-Unique: 1VZ_9dQgNoSqlEgcjPBVfA-1 Received: by mail-ej1-f69.google.com with SMTP id dx19so4692058ejb.7 for ; Tue, 03 Nov 2020 03:00:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4o15AbZ3fzzRBP1WGF4Ln3XoduoIEZnQEtzI6bpRkTQ=; b=Nq0GnLouDUNLLrhS0sCm6BUcypKAZj+moc+CThyA/ZpQn0zzuucB3JYKz59XF7puyw +r7d3jagQqa5EOZCA+hLFaNdLL/B3PsX17hOjRWnB8YVq+6tYRWTQJW4vNa72+2sa7DA k/2IsRTHtzO9thJWiBEkLxgUEnoKlTfNZlcNBjz2UAXqHiStfbc2aHKdUIhklb3gn2zb xPhnV1zpKPwEbqdh4xxDknbnf7MeRDR+h7CaoiaQoQ8QcMf4fCxWgpd5jZLhiQbbLq1a f4qQ/sv1CTz0d3/WxiMl4I+e7S1DXDgCV6lTPuOl72tTo1rgn/BOGaSfDfZgU3jx5/5P r0+w== X-Gm-Message-State: AOAM533zEYq+Qg2yBY3DH0PY2j5E7P7e/SOjKjvbydYWC8ddnPiglQl5 TfdVngxpvIB10vBibd3QuoMqK5pJBi+6Ko9FK87YD3f+E8UVooOXVIu2hHfFgvc+xYPom1khnBp hGVEuNKqsAOpG/BjjmsrC2Lcc+it5WpeJO4HtIXn6H/V6Y4uo X-Received: by 2002:a17:906:38d8:: with SMTP id r24mr20090743ejd.32.1604401235672; Tue, 03 Nov 2020 03:00:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwoTWc0lQXkFflXZFy12IX1To15obznIM0owvbQRpO/sFj9xQr0nsFAtgQ3VglLSFX3nxtVeQ== X-Received: by 2002:a17:906:38d8:: with SMTP id r24mr20090714ejd.32.1604401235448; Tue, 03 Nov 2020 03:00:35 -0800 (PST) Received: from x1.localdomain (2001-1c00-0c0c-fe00-6c10-fbf3-14c4-884c.cable.dynamic.v6.ziggo.nl. [2001:1c00:c0c:fe00:6c10:fbf3:14c4:884c]) by smtp.gmail.com with ESMTPSA id sa23sm10746638ejb.80.2020.11.03.03.00.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Nov 2020 03:00:34 -0800 (PST) To: Andy Shevchenko 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> From: Hans de Goede Message-ID: <6a8a246b-1b11-f569-b495-6440e70fc121@redhat.com> Date: Tue, 3 Nov 2020 12:00:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hdegoede@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US 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" Hi, On 11/3/20 11:49 AM, Andy Shevchenko wrote: > 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 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