mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Coiby Xu <coiby.xu@gmail.com>, Linus Walleij <linus.walleij@linaro.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	linux-gpio@vger.kernel.org,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/4] pinctrl: amd: use higher precision for 512 RtcClk
Date: Mon, 9 Nov 2020 14:50:23 +0100	[thread overview]
Message-ID: <0268d6cb-6516-251a-9b26-47c5e94eedc9@redhat.com> (raw)
In-Reply-To: <20201105231912.69527-3-coiby.xu@gmail.com>

Hi,

On 11/6/20 12:19 AM, Coiby Xu wrote:
> RTC is 32.768kHz thus 512 RtcClk equals 15625 usec. The documentation
> likely has dropped precision and that's why the driver mistakenly took
> the slightly deviated value.
> 
> Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Suggested-by: Hans de Goede <hdegoede@redhat.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Link: https://lore.kernel.org/linux-gpio/2f4706a1-502f-75f0-9596-cc25b4933b6c@redhat.com/
> Signed-off-by: Coiby Xu <coiby.xu@gmail.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


> ---
>  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);
> 


  reply	other threads:[~2020-11-09 13:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201105231912.69527-1-coiby.xu@gmail.com>
2020-11-05 23:19 ` [PATCH v3 1/4] pinctrl: amd: fix incorrect way to disable debounce filter Coiby Xu
2020-11-09 13:50   ` Hans de Goede
2020-11-10 13:18   ` Linus Walleij
2020-11-05 23:19 ` [PATCH v3 2/4] pinctrl: amd: use higher precision for 512 RtcClk Coiby Xu
2020-11-09 13:50   ` Hans de Goede [this message]
2020-11-10 13:19   ` Linus Walleij
2020-11-05 23:19 ` [PATCH v3 3/4] pinctrl: amd: print debounce filter info in debugfs Coiby Xu
2020-11-10 13:21   ` Linus Walleij
2020-11-05 23:19 ` [PATCH v3 4/4] pinctrl: amd: remove debounce filter setting in IRQ type setting Coiby Xu
2020-11-09 13:52   ` Hans de Goede
2020-11-10  8:26     ` Coiby Xu
2020-11-10  8:35       ` Hans de Goede
2020-11-10 13:23   ` Linus Walleij
2020-11-10 13:57     ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0268d6cb-6516-251a-9b26-47c5e94eedc9@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=coiby.xu@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®