Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3849346pxb; Tue, 17 Nov 2020 05:20:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+4c7CZE/1b9wJn7fS2PgYvrBTIaXlmf/Q5xzaH7NnIFdmLGbYFYeq5pO0LDpjAyooLegZ X-Received: by 2002:a17:906:2857:: with SMTP id s23mr8546418ejc.218.1605619232662; Tue, 17 Nov 2020 05:20:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605619232; cv=none; d=google.com; s=arc-20160816; b=B13v6ZnmTkJQMtlKjK5UlqEaqn0usgbCt7Eo0E+7bWRYhM7yB+0yj83SEp8CNnOgzV OkgqoBdwlHV99jifDsykKzTYCz4JvNvvrbZS4vtcBK5jBRpkeDU2Va+9ux+mzXi3AJFw LtSXmObW+0BlFvrWbx31uGAB0+ZH9ly5L7HHDwcZic43l5SxpZ1vgwh8lRVRGhx9hUxa Fk4nYeftQbtqSSgtCWixb8o2rDGrVxNjitAzgdC5S8SDeZbAkHEuswqpyIWtKJIVIUVb BxtqDyCNVr5Uj/UzOQrb4YjgNnNy9V9HMOvOpzhntnJp4LRo4TQBKvu3aTgXVc4EtYYG Uz0w== 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=UpPxMrVvVwDSHJ3HQr2kQP4Qlt+DWhwdaiT47VeQG50=; b=cLLO7i9II1oPFRaM9jM/ckzJeCUrc10BMRAeiQ/cZZXaQ6+wOW8YPM49IDWkdiKJgU 2fxAqBAlxeGUvFcQClP/TTvOwpUZLktO2dz7qose2ylNPCURNZ2ED2ysA7bmmpVdNfD7 Oy95oc1Yna5AhWUheInDd6Aw29Wovt0dFzJpzSx7Ajg673FPovNyW2HWVWUWE3H6iyMA M2w99rbtYO/TxS0WNa8j/e8vIoDHHOrXS1ITCmVo3RxpbkbxM8NN/REbxJc7OLM1kLEE 77yrXUd+Vu53i6S3xjEKm6ipu7hrwXAKowiAMoCKO9wf4hLHWY1c9kTNp+LqePMKo+Ce 4vSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RxSGIFty; 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 k20si13953116ejx.736.2020.11.17.05.20.08; Tue, 17 Nov 2020 05:20:32 -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=RxSGIFty; 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 S1730204AbgKQNPg (ORCPT + 99 others); Tue, 17 Nov 2020 08:15:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:46952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729522AbgKQNP2 (ORCPT ); Tue, 17 Nov 2020 08:15:28 -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 050442151B; Tue, 17 Nov 2020 13:15:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605618927; bh=Kh8c0m6N03l8QJ9+LJA5cGqBX12ys8wOY1jAnKUWrG4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RxSGIFty28lEqinyaEJ1cG/HwK6vius4NYbVsiiG1Oqg2SP+s/cudvIE9wohAjyNp SaoXd1p0org0IS+OhEdKjiPAxYzYvAsdEDBxNPZWg3He3f9sG3cVpQNpzcx6K3PG9I t1VOaWGi3yKUk+M/WiYn6pL9J7vpxi1mC1BfuzFQ= 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.14 55/85] pinctrl: amd: use higher precision for 512 RtcClk Date: Tue, 17 Nov 2020 14:05:24 +0100 Message-Id: <20201117122113.731504088@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122111.018425544@linuxfoundation.org> References: <20201117122111.018425544@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 @@ -144,7 +144,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);