Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3843436pxb; Tue, 17 Nov 2020 05:12:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjFbb/dfszZkEIHST/FBiegJ4ii2ldJ6TBP444b5ubnUmAg7F2khdreWpuk4XL9POP8Jie X-Received: by 2002:a17:906:f186:: with SMTP id gs6mr19983091ejb.171.1605618734049; Tue, 17 Nov 2020 05:12:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605618734; cv=none; d=google.com; s=arc-20160816; b=ygZpz4R8Rr1AVBMejiZB/SjR9eUuOHUH3o7C1EToj6SprpVF1wfjFOUwIEPf9m5bFA Y0iNan6KWUim4Fb4N5tyhZEzSgNm69VXkMd5qYbLZFVjV8sYUqBbTQN4+JyUt5IlWWQ6 boa2M8gUmTBkOv906P0t7KRuiIx3SJ2tksuRjoESe72IyLfjZyzjHZKiOQHZXXbl7L7K 50HGjyS1oR7Zhbynz5mfPbDSqBMrUaGzkgmcibX8qoFUOK12jG8m7stlLDRnWoaf8glu axpJGa9xBpkWYjbwndTIZenpPZZdPN+OcOVOMvZuhUTqd3p+nxzqi65BeaNnnV/J60E8 IKKA== 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=TjHjWGZfUUSZsjZ8ecAkD9CExhktKl9WIniFfrVx9wWBGBj2ClUVyP+28kOy+JdC0x b4M1ITYOYtMMtJI5a7P4Q921EEkZFlDPDxV4BYngeSqqWT+SWP4w3iNQLLe7A1YFDBHf ofnQReiYAM7SISZ613fXh3ZYlEhgwtayMt64fuXZ5S9jaCrQcjG3wC442SVgjz5ecnzV 9R9nggNYxG75soxHJcDtCTC5Iedm9weMEik/dZ2lg9QrzadyOL1KWgZDL2yxLxn9VB8M ZxBFUayGIf8Tc6YvYTbassBi2cxoY6vpeyZwHNn8waK6+V1IbtzLZx2DoqbXAH+RIWbF JgMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mWId2e4T; 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 c2si13715696edu.115.2020.11.17.05.11.50; Tue, 17 Nov 2020 05:12:14 -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=mWId2e4T; 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 S1729131AbgKQNHl (ORCPT + 99 others); Tue, 17 Nov 2020 08:07:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:35238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729121AbgKQNHf (ORCPT ); Tue, 17 Nov 2020 08:07:35 -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 205C9246A7; Tue, 17 Nov 2020 13:07:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605618454; bh=Kh8c0m6N03l8QJ9+LJA5cGqBX12ys8wOY1jAnKUWrG4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mWId2e4TMUvDxSZRBfqqZIYFK7LDCyrcIxWC5kUyadfEKK/kVPZRoCGObomoxvMx/ n6CM/1XIW7HXhUY3jFF1V1tni5NJ6G/7FgFx7gTvELyRLJg3DCuOz+zoOOK0mCobCH 4DNtR3G/13AJmllXrfJwESEYemlHWzvtQIt3rcs0= 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.4 39/64] pinctrl: amd: use higher precision for 512 RtcClk Date: Tue, 17 Nov 2020 14:05:02 +0100 Message-Id: <20201117122108.094251071@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122106.144800239@linuxfoundation.org> References: <20201117122106.144800239@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);