Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2701462ybx; Fri, 8 Nov 2019 08:09:15 -0800 (PST) X-Google-Smtp-Source: APXvYqxNeflLGCTit0TWviDIS8tmQxG6pRW8Q/CHbR6csTTNLVikxjI2aAFUXxZjDMegF9SfsVxe X-Received: by 2002:a05:6402:1a4f:: with SMTP id bf15mr11163239edb.160.1573229355556; Fri, 08 Nov 2019 08:09:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573229355; cv=none; d=google.com; s=arc-20160816; b=V737fRAJvAOcUqPlOFgEem4zEtJFVSJCO0Mz4SBtvYIZA3VCqx+E93IbM9dTv+EqOP cJHA1XHVmOgl0ALJYpL3ItEoYKTwpbeF1qNG0TnVnIVMN4bYw4FPDPTzfnr5OWwKbkaA /3fKXbShrefiujiBr/NCdxMawXMzipRUZdnXDoLWJfsiuRCsGLXwixuRbDIl2g3h3o5z aljNWA7djYx/o3x0+6nBvQiSwl3RUwBbJEIBYrBX5cl9MlklGpJaobHFsr6NnuSJnGCr FC52b861VNTNm+ue1cDQ1TcckP9zGXTugcZJ85h39jDkHDu69pNKd5HNg0ibSPI9xqtV EJ+w== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QYiOeheKGP1SyMnwvrZEqyGotYLx8UyThB4m88sPqzU=; b=bFj+hQsWKC/vNXrVjw12VjCYtoeCKLD0pEQLCZEsGp9ge0Fv0wHiWgNJ2A0hMDSQKz tsJGh355cfwHA2EfZv8fYO/81XJProOPcNl1BmFuPLtmVUPr9Af0iDtvjLXcwZGLwRun e9+Xljh2gwUP8y3Z4AXpYoxToB4UO//QJTr0LHTLipv0tiNV5lEDjjg1aAtbEsH47P5G ZtjtiD3QqASj12vV+Yx2O77Bzl03gGRWUPc0S+2s5eSorrh4W5uOduSvDY6iYDO8j6KB cy0wvV6+Pkki1bjeD0IzoZpuxOFRMR6q0ug1QaWnoPyUxiaBnsfwUONaVqkgClYqHvSA 1Ogg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NrS4aZ8+; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u11si5288539edi.385.2019.11.08.08.08.51; Fri, 08 Nov 2019 08:09:15 -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=@gmail.com header.s=20161025 header.b=NrS4aZ8+; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727296AbfKHQHy (ORCPT + 99 others); Fri, 8 Nov 2019 11:07:54 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39835 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726036AbfKHQHy (ORCPT ); Fri, 8 Nov 2019 11:07:54 -0500 Received: by mail-wr1-f67.google.com with SMTP id a11so7661974wra.6; Fri, 08 Nov 2019 08:07:52 -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=QYiOeheKGP1SyMnwvrZEqyGotYLx8UyThB4m88sPqzU=; b=NrS4aZ8+rt9JvhwWyrI76zWpMfpQ6VOIbqvFZ9DhIz+wFExsjA16IPkgLmE1puLeE4 k2kePBgdQZst2ZKwpXuXn7EkHRCs0zVGZ7Ncgks2cEGzQ74aR/g2eZHbgZnTAjhzfZNI DghKVD2eFEZoKIx8qbmee28OjprdkDiexAPTtb+XCnt7H+F098YrsFmljKXQHJgXJF2M IrZuJ28amuNH1nuxcoq3AZo7xefnYWsUl2bP+tndZaWfB0JYEJ23iJGNRV/o2YIOF/xg bV6EMcgzkFHWD5sxkhBEzxT/nEJfRLExt3fLJRlzd+B28feQhPG1zoxC2xzR1ehoOKKy eL/g== 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=QYiOeheKGP1SyMnwvrZEqyGotYLx8UyThB4m88sPqzU=; b=ptWExtdIAxdyPydn4VHgehhTWt3CiqaoyeBhewpM+T/D85qtJXwf9vDnGwKsQeu8Vn vZrLVUSm1hVO26qXKi+aOto+MbFdsgsd7dzt16S5op+xoJo3xKi1Q/FSX6T3vAc+izTm w3tyyqrMHv3YbT8S2ve062PQXns8BASxIjoYD21F82PGy22lwvbCPUIrf4MYloNakRnK I24pKmfFm9qHhjanvhGhAfVljM+F8Tmz8EXx5Me8TirB9ULz8KygOQl85OMecAuJe2I5 6gk+b6av8SwNEcNUtp5+KKg+TMZupC7hsLYpMVYAtpumFL9br4G9eTzb8+G6ZiEAy5wV 4d+Q== X-Gm-Message-State: APjAAAXC16EuqbhYvor+h+LqQuJjPObrswxUuSma1XIvqNZOtaMpO7K7 5ATjXM/B2Q3zd9MXpKcZUxw= X-Received: by 2002:adf:e386:: with SMTP id e6mr8700074wrm.397.1573229271771; Fri, 08 Nov 2019 08:07:51 -0800 (PST) Received: from localhost (p2E5BE2CE.dip0.t-ipconnect.de. [46.91.226.206]) by smtp.gmail.com with ESMTPSA id a16sm9456639wmd.11.2019.11.08.08.07.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 08:07:50 -0800 (PST) From: Thierry Reding To: Linus Walleij , Bartosz Golaszewski Cc: Pavel Machek , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] gpio: bd70528: Use correct unit for debounce times Date: Fri, 8 Nov 2019 17:07:47 +0100 Message-Id: <20191108160747.3274377-2-thierry.reding@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191108160747.3274377-1-thierry.reding@gmail.com> References: <20191108160747.3274377-1-thierry.reding@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 = 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