Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp76981pxb; Wed, 4 Nov 2020 15:09:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxycxZAXbAlAM3OkTCZR6K8YUosJhFwS8uV9BhnJc8Do7N+ZnXtf6GXQuSFChuFiMxC7/b6 X-Received: by 2002:aa7:cb4a:: with SMTP id w10mr111216edt.343.1604531365419; Wed, 04 Nov 2020 15:09:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604531365; cv=none; d=google.com; s=arc-20160816; b=hLwE5stOei9UjwnrtQc0hNkrmu3b82NoJlulfjQ6ZAGqnIOsQpfPa5RHx/lJC/BpU0 gGCXniElDS37Vqy7sbnMWa1A+fB6t5r2hER89bXU007I/8WVcuPSnp+B5OGlx/TESMhy fWY5l8my9F+IYRGDmj5jJLFdlZIYb3oUyV6/Qeib4tmFXH+8ErMOyxNDNf0kh5v/DUy/ 6yvYpbIgZRHC58noz2cISZ/CIK33wcnjpZjTCA/lfqEthCHYIeLX0Qgcep+DRRGqUeGE UwxTS4WHK7gmFayo+0M+ddBo3fKcKk51gLzc13bZ8zBigf2j2JvmZRAKVWYY0Ebw//7l 9zRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6Zz/F/9DywCXKrdJ727enMYsohyIoEZCj37+BjAtekg=; b=AAttiu5ZGpXjbMvfdiwYuTvkWs1bymHStXlr4079MIpyecCGF65tRS+bn8T86GudQS KsawKEhKwimrnlFc6aGzBupNvlsPfImDFachB52vSHJ4dk+a/AMo9GXPAn04ExI5Z4ap 64N1KTgRQ+GT8a/3RCZu0JK3o/AeRsswPkS2s+EHae9RU+GnohvWXzjdPZW09cOLAuoE 4U1KjGbMblcITbYvWU7ieeX4LHaTjQGos56r1owGoBWwZ0Bd/luu67eIbxE170s+CHTm LJqj/Yv0dTJFQjvZG322SYT0OnsNwly1wjDBI5Y3m6njDAjPKgaEjo69w/v4cni4K3In IPYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hPiMdy44; 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 d20si2243686ejd.399.2020.11.04.15.09.01; Wed, 04 Nov 2020 15:09:25 -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=hPiMdy44; 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 S1730888AbgKDXHf (ORCPT + 99 others); Wed, 4 Nov 2020 18:07:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728301AbgKDXHe (ORCPT ); Wed, 4 Nov 2020 18:07:34 -0500 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A74A9C0613CF; Wed, 4 Nov 2020 15:07:34 -0800 (PST) Received: by mail-pg1-x52c.google.com with SMTP id u4so120562pgr.9; Wed, 04 Nov 2020 15:07:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6Zz/F/9DywCXKrdJ727enMYsohyIoEZCj37+BjAtekg=; b=hPiMdy44bejB5JwQ3/j/JS1hhaXkizeC5ZoCj50REvR3cWalY5fmMuk+X+6VXcl8TB KdmTitTzob1Fpn+epQkxgeR603NHv8pNJmTNYPejaHEdkowexM5r9F4ZN4Ks74oihnb8 JIv3JjmOkQK8zrso/3c7gRfN1YkXqOFBZN+mqKDjhxy4gZYvLZDwOWaifLU4Wp1JfSWS cQWu6YLSE1N5k5XdO26ZgRXSqr4CkZikbiil4GDXyKm4FG84vtOkbzxo7pLvxZOF++lg DXFJvRN8Iv4kJtBCAM+jsLcdKLJ0iCBl1zU4qTI+sFyGm4rcTXQ6Vk8hQjPUHQYlKXm3 dcYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6Zz/F/9DywCXKrdJ727enMYsohyIoEZCj37+BjAtekg=; b=KCoGkPG5YhaiclS/FwaTh9ep0DzuIQz42xnmkplJySeRroKOx4HpGPk122+3Mx08/F MVTUhr42oQotkcv8q2bmYhp+M20qs5wGbArtyREqS7f872F3SAHb4XJJSXIcewpJMJ5G Y5ANSztJljOQa3kIvCjyB9d3PNgbLTJ7mfiurbMZy7GO6/ZXtin0U4XduQWeS2QZ89SL VBaE+JMmKuALU8tQ05AvKOwuZcu3fRKrU4lfD2Hk4EFZTcKTFQ42LaXYg/NJFAEW9TQT zbQ38rTkU0bxO10qGNnNxoUqHzId51Ds2B+O6miJkSrxcJUaTFJVB4PZNyfW+VxTqcLM jxNQ== X-Gm-Message-State: AOAM531LooiuVJ/U64QDmG53C6WngIJCb5Hvjp6ZCJhe8Ia+wr6+sC4d 4Gd5F15ZChKw/wWvWZxBeSA= X-Received: by 2002:a63:4644:: with SMTP id v4mr236233pgk.351.1604531254268; Wed, 04 Nov 2020 15:07:34 -0800 (PST) Received: from localhost ([2001:e42:102:1532:160:16:113:140]) by smtp.gmail.com with ESMTPSA id y203sm3658197pfb.70.2020.11.04.15.07.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 15:07:33 -0800 (PST) From: Coiby Xu To: Linus Walleij Cc: Andy Shevchenko , Hans de Goede , linux-gpio@vger.kernel.org (open list:PIN CONTROL SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 2/4] pinctrl: amd: use higher precision for 512 RtcClk Date: Thu, 5 Nov 2020 07:07:01 +0800 Message-Id: <20201104230703.21466-3-coiby.xu@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201104230703.21466-1-coiby.xu@gmail.com> References: <20201104230703.21466-1-coiby.xu@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RTC is 32.768kHz thus 512 RtcClk equals 15625 usec. 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