Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp871268pxb; Thu, 5 Nov 2020 15:36:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJcA9zNh9glsjDdKUbNRAJ0tKCJ5rr+idqa3NvM+mx7dRbteGWLTg1HZ6aX5UgamI7/JoM X-Received: by 2002:a05:6402:181a:: with SMTP id g26mr5479448edy.8.1604619417460; Thu, 05 Nov 2020 15:36:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604619417; cv=none; d=google.com; s=arc-20160816; b=JiR613zJQ0RQQrT4UTrsKZFZ7tD3mGaNtaFKMSRz/AM34JQ5B5z+d3WAsrFK+niAyS lZEu6dixMJUrLT/0zNuGQgdinY5aDt41i+KZbx1Z60cqYHyiXHXV5ifWbrReXES1yKuw gC+YlSlUJC1cGhEv19JaXh3wVOgs28WPRnUyK3qgC+T7pya3IbkukDLCQAyPfsD3cuwI +BMGlUL4nlEmYlWcUQLWmftMIHWd77sscA3nq5E056Kt06JeiA1MouhvlLEoKNArFDe6 iAlcPcK1rzDwv0qnHtkgET8uSG5Et/mkxRu/IUxXgaiU56PHR65g3rWkW59xXbJ8Qke1 Jm7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from:dkim-signature; bh=pibkzdTjV68+ZVyJNDC0M5RL/qSDH5KT3MGSB0PSjCA=; b=t4/wyOmkuHp6D5vRLMc+kBLzEQp3j8J4YJ6vyUPHDMHgV73YyLiYvwWXoFHqBu/Wb/ yXmfL+Ud8r/5dxbK/IMBsJOCgksYv4p1QKEke59wHAwHyWaJSG0qlhkTARGCbZ0Zyx/d mPnLLgR//7AyWEi9s30s1VuL1QHLn/XYf3KjHgYuL7fTOtDQfnUnxtuuVk61zBhuheEd PONou4HexWXtkZbquLZiELsL3F7dN8L4rzxzDdVc76Y/Fyp9BDdvdNcgNtTp1Mp/2p9o 67SMT2np4HY50BxUZ5BBpeNkqfSiMsS/OdMfu0ASCSlY58D8NrlUya67pO2jZNqd+AxP Ledg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U3WDNJfK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i5si2156372edn.310.2020.11.05.15.36.34; Thu, 05 Nov 2020 15:36:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U3WDNJfK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732533AbgKEXc5 (ORCPT + 99 others); Thu, 5 Nov 2020 18:32:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731060AbgKEXc4 (ORCPT ); Thu, 5 Nov 2020 18:32:56 -0500 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 551C9C0613CF; Thu, 5 Nov 2020 15:32:55 -0800 (PST) Received: by mail-pf1-x443.google.com with SMTP id g7so2313351pfc.2; Thu, 05 Nov 2020 15:32:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=pibkzdTjV68+ZVyJNDC0M5RL/qSDH5KT3MGSB0PSjCA=; b=U3WDNJfKYahYQRO5ADhBHaQ3evR0sBikDSlasQkRs7jOm1zemannkYJizQPO4cj1PR 7U4cJiLRC2lDw0CXG27m3Kdw3gQYksbJb1l4+WKJ95NSIAKqjUW55ytePG+ogTlBTi3e ODoj1tCLIFVqZc+bEYkMAAlFx5p6o3wYTTv7Lb4qNa8I4WQNv7VUorg3Y/t/8nkcXlAv wLuPbkrToWBawMjqDiDnIuPvuJGDmkuKlvKjrJyEULm7jTgFIlq8yaHrGH21hO62wZ1r bia7moaIYGbtygjIQnxSzZJNXYq7dbKlKaWHZL/aAG3tbY6pqutAPbgDQ4cqV066e6fL 8zkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pibkzdTjV68+ZVyJNDC0M5RL/qSDH5KT3MGSB0PSjCA=; b=SEu0YIUnrhrOrtTq6T3rnsYmid2AZmv9ugb3XBEW0firnLzIGRJLTs3r3cTAYkfvL4 oQnss4/B8HD187OV1S5KWw/t5/3/nJ8qs9slPh97dIhSP09+ixQTiZjKtJs73+JX03dE udejxP9lS3C0J5N8ezfPTltA490Rtv1EVUPmVmuB6JkSWbxl4kzpgqIOFVC9m8QC3T98 98XZUQXkFrkVz4p9GF59TptdVMSMTwcd3r6icOYExFyxgDi+1gl87ArS+6lKQZbZuOjh Vy6+q0W2JfvgGKGYYIVmBUcYX4QSAiJlCCdWpixgYFxtwtckWTrjpED3jKXZva+XnM0U LExw== X-Gm-Message-State: AOAM533L39ldu0K20GaZqXvxqC7GsmpYU90oYJQAY+8urqwfbD3Aqglf X9hBnD1GrCge9j47DJ1Ec64= X-Received: by 2002:a65:6a46:: with SMTP id o6mr4552169pgu.36.1604619174930; Thu, 05 Nov 2020 15:32:54 -0800 (PST) Received: from localhost ([160.16.113.140]) by smtp.gmail.com with ESMTPSA id b23sm3830055pfo.21.2020.11.05.15.32.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 15:32:54 -0800 (PST) From: Coiby Xu X-Google-Original-From: Coiby Xu Date: Fri, 6 Nov 2020 07:32:31 +0800 To: Andy Shevchenko Cc: Linus Walleij , Hans de Goede , "open list:PIN CONTROL SUBSYSTEM" , open list Subject: Re: [PATCH v2 2/4] pinctrl: amd: use higher precision for 512 RtcClk Message-ID: <20201105233231.xva2zjxnmpwy5tmy@Rk> References: <20201104230703.21466-1-coiby.xu@gmail.com> <20201104230703.21466-3-coiby.xu@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 05, 2020 at 01:13:07PM +0200, Andy Shevchenko wrote: >On Thu, Nov 5, 2020 at 1:07 AM Coiby Xu wrote: >> >> RTC is 32.768kHz thus 512 RtcClk equals 15625 usec. > >I could add that the documentation likely has dropped precision and >that's why the driver mistakenly took the slightly deviated value. > Thank you for the suggestion and other fixes in patch 4/4. Applied in v3. >Anyway. >Reviewed-by: Andy Shevchenko > >> Suggested-by: Andy Shevchenko >> Suggested-by: Hans de Goede >> Link: https://lore.kernel.org/linux-gpio/2f4706a1-502f-75f0-9596-cc25b4933b6c@redhat.com/ >> Signed-off-by: Coiby Xu >> --- >> drivers/pinctrl/pinctrl-amd.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c >> index d6b2b4bd337c..4aea3e05e8c6 100644 >> --- a/drivers/pinctrl/pinctrl-amd.c >> +++ b/drivers/pinctrl/pinctrl-amd.c >> @@ -156,7 +156,7 @@ static int amd_gpio_set_debounce(struct gpio_chip *gc, unsigned offset, >> pin_reg |= BIT(DB_TMR_OUT_UNIT_OFF); >> pin_reg &= ~BIT(DB_TMR_LARGE_OFF); >> } else if (debounce < 250000) { >> - time = debounce / 15600; >> + time = debounce / 15625; >> pin_reg |= time & DB_TMR_OUT_MASK; >> pin_reg &= ~BIT(DB_TMR_OUT_UNIT_OFF); >> pin_reg |= BIT(DB_TMR_LARGE_OFF); >> -- >> 2.28.0 >> > > >-- >With Best Regards, >Andy Shevchenko -- Best regards, Coiby