Linux-GPIO Archive on lore.kernel.org
 help / color / Atom feed
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Pavel Machek <pavel@denx.de>,
	linux-gpio <linux-gpio@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] gpio: bd70528: Use correct unit for debounce times
Date: Tue, 12 Nov 2019 11:20:05 +0100
Message-ID: <CAMpxmJUdqWzMJo0LMXudyzyoyP9TZyAA1t50GxG0DCL3aTBASw@mail.gmail.com> (raw)
In-Reply-To: <20191108160747.3274377-2-thierry.reding@gmail.com>

pt., 8 lis 2019 o 17:07 Thierry Reding <thierry.reding@gmail.com> napisał(a):
>
> From: Thierry Reding <treding@nvidia.com>
>
> The debounce time passed to gpiod_set_debounce() is specifid in
> microseconds, so make sure to use the correct unit when computing the
> register values, which denote delays in milliseconds.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/gpio/gpio-bd70528.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-bd70528.c b/drivers/gpio/gpio-bd70528.c
> index d934d23b77c6..d29cbd3c9e53 100644
> --- a/drivers/gpio/gpio-bd70528.c
> +++ b/drivers/gpio/gpio-bd70528.c
> @@ -25,13 +25,13 @@ static int bd70528_set_debounce(struct bd70528_gpio *bdgpio,
>         case 0:
>                 val = BD70528_DEBOUNCE_DISABLE;
>                 break;
> -       case 1 ... 15:
> +       case 1 ... 15000:
>                 val = BD70528_DEBOUNCE_15MS;
>                 break;
> -       case 16 ... 30:
> +       case 15001 ... 30000:
>                 val = BD70528_DEBOUNCE_30MS;
>                 break;
> -       case 31 ... 50:
> +       case 30001 ... 50000:
>                 val = BD70528_DEBOUNCE_50MS;
>                 break;
>         default:
> --
> 2.23.0
>

This fixes commit 18bc64b3aebf ("gpio: Initial support for ROHM
bd70528 GPIO block") present in v5.3 so applied to fixes and marked
for stable.

Bart

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 16:07 [PATCH 1/2] gpio: max77620: Fixup debounce delays Thierry Reding
2019-11-08 16:07 ` [PATCH 2/2] gpio: bd70528: Use correct unit for debounce times Thierry Reding
2019-11-12 10:20   ` Bartosz Golaszewski [this message]
2019-11-08 20:54 ` [PATCH 1/2] gpio: max77620: Fixup debounce delays Pavel Machek
2019-11-12 10:16   ` Bartosz Golaszewski

Reply instructions:

You may reply publically 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=CAMpxmJUdqWzMJo0LMXudyzyoyP9TZyAA1t50GxG0DCL3aTBASw@mail.gmail.com \
    --to=bgolaszewski@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@denx.de \
    --cc=thierry.reding@gmail.com \
    /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

Linux-GPIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-gpio/0 linux-gpio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-gpio linux-gpio/ https://lore.kernel.org/linux-gpio \
		linux-gpio@vger.kernel.org
	public-inbox-index linux-gpio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-gpio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git