Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp403739pxb; Thu, 5 Nov 2020 03:16:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpv8WPbtOrWZnvb8yP0ZChUOtd2GZ4a/7gE79LftnmE+ktsHbP5vVdrQjm7UUgKcUPQc9m X-Received: by 2002:a17:906:6949:: with SMTP id c9mr1741961ejs.482.1604574975435; Thu, 05 Nov 2020 03:16:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604574975; cv=none; d=google.com; s=arc-20160816; b=0b9I5OFQOZ0cSD42ibS64+VE/N1vk8OfjTZwWV2CwEV9q4wdmJym+h96D2Z0IjXDLi 2IkduTYYKMoSbCY8m5KBA78UgS5Dhr2nzU/btpRQpc3mtLqOKNtH8gJP/brg+a2dnXGg +MA5e0ZVaQiiCjBQADqp/ekRfrDlo81aKc7gABolvCo1geTQiBgRvW7azzyxKglikY7l +SbmgVOx3mYusERt03q/FAKpAwrctcw69GTEjKB0qTR9QRqAsRSWY+da2uNPKB4hQnE8 88hSiBtTW8M46OA+eyavmUPL8DwrDuOIxaqeHK5qfFoOmlEEFcX3V9JSpJUmpmGbQlcj jWew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=iUjAoEg9iu+vP2+zZMk5CXPigZo8ZpjB6LQlpjXIY5I=; b=IPDtvMvLaGuPWRQVgrIWo2rmQN2iJTAQZtUDGOPBUH5pvaS7WiDRlrEQRK5XVyJPwm 83+CGmeWWlcfbIGH6475M40jl3+k1t0MssSFyNi3DYPx+ekqY6Exb4KGeZBE+hY0Flnm ecEeXfvNJB11cBNaxvd8RbF5DNgkhxsWcK4cHP6VUlEFGOg2eN76AwFpPrObGjk78g9a Kf0EjHalM0dXfxLH7VVt5sQAmQ212R8801qMSa+HDqOIa+d3B8zwsQ3vniAuQx5GH4gj TUDI3EGG+lOaoQq6eFhzmjQWDjEAQVL3n9ublmx4OlnuEDR4ZzhWZsoOaNDgSowUyjK0 azxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sMoaiLkw; 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 o11si867436edt.474.2020.11.05.03.15.52; Thu, 05 Nov 2020 03:16:15 -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=sMoaiLkw; 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 S1730015AbgKELMW (ORCPT + 99 others); Thu, 5 Nov 2020 06:12:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726067AbgKELMV (ORCPT ); Thu, 5 Nov 2020 06:12:21 -0500 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0A3AC0613CF; Thu, 5 Nov 2020 03:12:19 -0800 (PST) Received: by mail-pf1-x444.google.com with SMTP id c20so1226440pfr.8; Thu, 05 Nov 2020 03:12:19 -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=iUjAoEg9iu+vP2+zZMk5CXPigZo8ZpjB6LQlpjXIY5I=; b=sMoaiLkwhmYoft6uQTfT2jODEzM75U9zMoId/2BZUYMxZu2PMiRp5J1vBrGxsKJQZ7 Fk7Fal0QYwLNLJ1xprNRg0KZ5As+19fF0c0i36JVwRSwdbGcQ5pdUu4PP8Wb6H43WFpT o6SbUCvg+qoGC4JKyDsSQS+Scr8uQaEfHx3XrkL1xA5JLo/bH21GljEmGFwV6B0Bab7D fhLFS+5aRMbqZljkz2e6MvURqeOTxNotQLz58K+zKMDxGVuLpj8dsuozzzKLKfFUZSU9 rug/tsPcJcnhmidy4FTTjQ13Wj4UrGUIHJJlOi8MZbPqRHbKd3SeoKiokKO086jlxhQd 7Vrg== 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=iUjAoEg9iu+vP2+zZMk5CXPigZo8ZpjB6LQlpjXIY5I=; b=rju8pGYDsWboDpuSa+tRNwuvjjvWWZP0zDeNncB9wIsRaAxDOvxRVBao/dbYN+Ikbk XkcGdGJbf92QpZvn+qdjiHllkhnWiCZOyJwRVJ6G7OJURH9E9LvJWAJXeHx9sgp26pgN 4oEWAiT+ZMWh4tzxQX9fdqDVl1dMs5/fGnSDS4vIbIO/WBu5gXiabVUIKrU9+HMFOAqQ +olmeZWFmecjtnt/bGMqpbBoJrDYaTv7ikQiOuM3pnyRtc0mhyC4yUwdajTcNHlVs0HW Ci+6Rz8qlcg2j5TrFkYSv2jz9pH27jr7IDYXhcbCjj6+J0Ac5WAb3s/SO/oXCzs7jeee HGIA== X-Gm-Message-State: AOAM532LiyqddrD/lDFqQLLgXF5pnX0UHQWq8NUauHJf+rKcmleXHzax BQ3ynajEkCmwymCP4CuoM2uC2UlKb5dyjSmul5Ytvi4vZSo= X-Received: by 2002:a62:343:0:b029:15c:e33c:faff with SMTP id 64-20020a6203430000b029015ce33cfaffmr1875620pfd.7.1604574739473; Thu, 05 Nov 2020 03:12:19 -0800 (PST) MIME-Version: 1.0 References: <20201104230703.21466-1-coiby.xu@gmail.com> <20201104230703.21466-3-coiby.xu@gmail.com> In-Reply-To: <20201104230703.21466-3-coiby.xu@gmail.com> From: Andy Shevchenko Date: Thu, 5 Nov 2020 13:13:07 +0200 Message-ID: Subject: Re: [PATCH v2 2/4] pinctrl: amd: use higher precision for 512 RtcClk To: Coiby Xu Cc: Linus Walleij , Hans de Goede , "open list:PIN CONTROL SUBSYSTEM" , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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