Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3852753pxb; Tue, 17 Nov 2020 05:25:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZq1aoqFrEQCSv9z5XjISFvY0RJg7Vpj4ybcXK9dcra2K58Nd7X0f55mzmkLVQR4q2ZCZL X-Received: by 2002:a05:6402:1804:: with SMTP id g4mr2054460edy.7.1605619525372; Tue, 17 Nov 2020 05:25:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605619525; cv=none; d=google.com; s=arc-20160816; b=noOcvD5mKba6PMGZVB1xGNBunb8rEpIgcKLhvczH8WCndAt59pKy5V7Tyfwo5xp6oM 3uXxD9xPNyKsHXbMUrJ4kvySORm1Xx1HhPxF2m7jZPIMZzZTLLA9UlUsjLSSjPJYcXx4 YUgrdmKUFyja4H/jYsGhykIUGovl7b38CJiUzwN08e4MZH59+WBuNWSM3q5GWDZZQXyB t4ZY2jat+q5QnVaXFLHrveF5zaBoIeLjdvuD+6AxRYxW2Ro/WIsVJLiYslyz5xBpNLZC G59EHx712eTRajilxYiU7y5Sc/DUz3Hv4EYrIhngLbrj3mxirmLXUWDrIk44BtIblCL9 GZvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gX6NuhZPZIoBiCxpBISeKOtLit6RGOSc/eReWGHHB78=; b=tFwYCJqpSY7nfsmTdf8Jd98jEcwU4A0/I4V/D54PqkVKLx4zi0OVLMRfEl759HEhlX MidFJW1oMnatnJfwRvP58miPT/UiMa4LKHAXrGegte+VCd5WwUUxtDqNGw4uxzwCXKgs c124mfEbPULoiPIZxK25q7XTzSjK/BMC2jGNqPcvgqi4xArKcX/ramdXvf1EJrPLiH4W TXsCJPCM6bQ90m59/SFDTavsm2iskHM7t5u7nf61zIWOzYy6RqiNs/HlgWh0r16BzOd2 KKZRJDpsQsSeEOXglfvAFmfqSi2WzPFJeshrKkC07uYvg9qDU+LUOvgi6pEQ8Q0e5aZz Ta5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gV8cEsZh; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u7si2147141ejt.194.2020.11.17.05.25.01; Tue, 17 Nov 2020 05:25:25 -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=@kernel.org header.s=default header.b=gV8cEsZh; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730817AbgKQNVF (ORCPT + 99 others); Tue, 17 Nov 2020 08:21:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:54710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730818AbgKQNVD (ORCPT ); Tue, 17 Nov 2020 08:21:03 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ECDF12463D; Tue, 17 Nov 2020 13:21:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605619262; bh=7TJI9x1N6grVWGoy/8MQdKRzW6ebTc/YANR99Xd3fSo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gV8cEsZhkCplWunAlqd54wOKndbxVSLzIWUVy0Mhg5dQWr/OdY47iRiCP0rcdwXOO 2yt9+7eXZKgUeAhZfC8q5ZMWbU4BI2gsw30JS3vJeaqmSpyt1++C6gcjjf13rlO0U3 WIMX+HafX20Fnggig0Utv/iqkK3oLxAuZLuTLXhI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Shevchenko , Hans de Goede , Coiby Xu , Linus Walleij Subject: [PATCH 4.19 083/101] pinctrl: amd: use higher precision for 512 RtcClk Date: Tue, 17 Nov 2020 14:05:50 +0100 Message-Id: <20201117122117.168880432@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122113.128215851@linuxfoundation.org> References: <20201117122113.128215851@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Coiby Xu commit c64a6a0d4a928c63e5bc3b485552a8903a506c36 upstream. 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. Cc: stable@vger.kernel.org Reported-by: Andy Shevchenko Suggested-by: Andy Shevchenko Suggested-by: Hans de Goede Signed-off-by: Coiby Xu Reviewed-by: Andy Shevchenko Reviewed-by: Hans de Goede Link: https://lore.kernel.org/linux-gpio/2f4706a1-502f-75f0-9596-cc25b4933b6c@redhat.com/ Link: https://lore.kernel.org/r/20201105231912.69527-3-coiby.xu@gmail.com Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman --- drivers/pinctrl/pinctrl-amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pinctrl/pinctrl-amd.c +++ b/drivers/pinctrl/pinctrl-amd.c @@ -157,7 +157,7 @@ static int amd_gpio_set_debounce(struct 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);