Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp343998ybc; Tue, 12 Nov 2019 02:21:33 -0800 (PST) X-Google-Smtp-Source: APXvYqxC6vrftiP4nnWrsNhVg11Wj7STz9vQEwyINApqSieOoz1uggrpmI8zuJ0/Bs+5rF8eXpNq X-Received: by 2002:a50:91c4:: with SMTP id h4mr32201142eda.36.1573554093337; Tue, 12 Nov 2019 02:21:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573554093; cv=none; d=google.com; s=arc-20160816; b=y0/xlTC7rbewvXK8rzD+Y2WF1MdjR1x0/kAa7NDHD/Hf9VX+q0UJNp7cIUFIUrxAle 6lJtEj9xIxH1FUeLZcIl/T1CZ8feh3e1AI1+uKkJ53grOjNpzy30YtEtV4S7WfR2gHLp 3GxfZLmzz+19lfZfxDelRRgGfyaV/w3OTchM9ztMd2VXTqg0LHSbTIIKO5fe2IH2zFqq xvCxtYd70EqId7Jj7MANC6ax0/Je84b9BXbgM643PDbxyShd4gNIwKG4nmjBULfIJ0i8 b1bVMQYdYxEFUJf+RStxHvX3sI0OQYv1pbDUi3+Al0q6PpQePA2EyCRDMBd4yF993Fyp 737Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Rjd1FS8nNm6yRr4WVn+HN8ZG0ZScPCeZT4lpNVe4Zbk=; b=tJT0vXlI622hJ60lbsT/QhJUpCSOwF5q9vsOOt8Ic7zKoKX7DKYdOefXOG4lwa3K6Y PNgBy2jcOriLP+ZtILZ7Wip0N/ghvtadGGWs9u8ltEcQtVCf4nj+WHMzCxq0hBY/CIeg ZTTw85xIUTtm1qZLgTCxRbxnlwkeQ+9DIVLQZKhByPsI+og1E6IE7hZj9RLJqHOVS+5v ggKeu7LTbiUA2DauXYYF5kSgjwx+cfOrIawDijrw+chzV7NPklE9e4vtfKA0RQeiPp6a aBa+u0J1CBSCHkrFH1kAX7tt0Ym/Nd3+YOy0D2j0kPb3gS6mpWQk+qmuh2q/ziYgkva6 skcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=HT2E7HWm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23si15461239edj.380.2019.11.12.02.21.09; Tue, 12 Nov 2019 02:21:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=HT2E7HWm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727113AbfKLKUR (ORCPT + 99 others); Tue, 12 Nov 2019 05:20:17 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:43273 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbfKLKUR (ORCPT ); Tue, 12 Nov 2019 05:20:17 -0500 Received: by mail-ot1-f65.google.com with SMTP id l14so13823460oti.10 for ; Tue, 12 Nov 2019 02:20:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Rjd1FS8nNm6yRr4WVn+HN8ZG0ZScPCeZT4lpNVe4Zbk=; b=HT2E7HWmfg4NPppXd4Z/N3e+10XqEJpkjLfqXexTfchGFx59EKIlflcB29Pvff1Ii+ Pee1vLZ2acJeOayIkvQe1hyi56T6jI6nITcT9E2DBBnQq5J17t3acaq+8cyxRmA4k+fm WA46zucZtzf5PeihhI8Cp2UsziPgYvcqyd1YpZHDAe/RpWNEiIaddhmbc6XHTsTLMwGK hrIRhCGCg12VYvW1IsWdRWeFqQVf/n4WkoCKnbQ8LcdTIxaXkMjkxWrjnviserTeAkL9 DarQ/kew1zKc/ZWhn4Ge8QJzrHzk5AEvI8rGEV4/4PKULnnxZybyYBkdT3ayUrli5Mhe b5sQ== 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:content-transfer-encoding; bh=Rjd1FS8nNm6yRr4WVn+HN8ZG0ZScPCeZT4lpNVe4Zbk=; b=ipDhKzOvYpp2u11H2jYhVe9HY6CUbcaywBBoc9I2NGSkDI6vTwF5Qa99Oh+52sERUt F9r8LLqRT5SQB8wlEYfwyQ4JoNcxy65oitDZdLIYOWjSMhGovwdueUhDZOM5oaibac+c dqk0B0jKLSfcA/yH3Eg+MTg8TXWjaLPp7QxSaBWnSQTeLONuiSFwfxAdlw/CUD5at5J6 TN7s3WRc0AJDw+1HyLUBGkEQgqjPlE2bAcESBxrvqawXtkXnl8kMYCVEvCduhTKsD/S9 AUt6TiURTqBAh129p89mIYCry6BAMfpn91xFFo1zkTvCzu/K1FWMn+dZhRiH7+S663gp /Uww== X-Gm-Message-State: APjAAAWEMb0FoXE7m831/ZeFiRX4V0EbjuQiPhWqYHmAeceZTekA8llt m4ydjw5Q+Js4cQgt/oUgxiOLLzzB2tHmhpziMaA4Ww== X-Received: by 2002:a05:6830:210e:: with SMTP id i14mr24546593otc.250.1573554016083; Tue, 12 Nov 2019 02:20:16 -0800 (PST) MIME-Version: 1.0 References: <20191108160747.3274377-1-thierry.reding@gmail.com> <20191108160747.3274377-2-thierry.reding@gmail.com> In-Reply-To: <20191108160747.3274377-2-thierry.reding@gmail.com> From: Bartosz Golaszewski Date: Tue, 12 Nov 2019 11:20:05 +0100 Message-ID: Subject: Re: [PATCH 2/2] gpio: bd70528: Use correct unit for debounce times To: Thierry Reding Cc: Linus Walleij , Pavel Machek , linux-gpio , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pt., 8 lis 2019 o 17:07 Thierry Reding napisa=C5= =82(a): > > From: Thierry Reding > > 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 > --- > 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 =3D BD70528_DEBOUNCE_DISABLE; > break; > - case 1 ... 15: > + case 1 ... 15000: > val =3D BD70528_DEBOUNCE_15MS; > break; > - case 16 ... 30: > + case 15001 ... 30000: > val =3D BD70528_DEBOUNCE_30MS; > break; > - case 31 ... 50: > + case 30001 ... 50000: > val =3D 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