Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3851325pxb; Tue, 17 Nov 2020 05:23:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrGuf3AiD+0TdwMuaudi7TTVuDfuFzVxMqAuh269PwUXMdtzFdpT0c2nc/rB5l6uxa46f+ X-Received: by 2002:a17:906:3807:: with SMTP id v7mr18450374ejc.441.1605619410366; Tue, 17 Nov 2020 05:23:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605619410; cv=none; d=google.com; s=arc-20160816; b=GtCQJ+gGFW6Wysmt7LlPtfNVisrhzZMIcgu4AW5J8pGM+KPxbJTNsyqxmAsDoOPdMs oHlGAGTIdPYVS7/k3tNhRBdx2V+/imXOmX8B+bsKYd3Q8ewF1w1k8sISHcOVwdR+IgSb DIWclu4vitTCHuKmsNGS32Ga3G5yHHiZU8mmsSG0jtbXKzG2SuRDFqhRUJW8NVbj7Q8J aK2xCr/RjxtWojtC5QhqiK1OCMSFHhpic9yoyNFRLTdiQ6LbgyDpqu8tEPRc1ix4iFzj ojAvKDEmFa3/TsY+vW/ZURkDhi5GawsrkuUQSFkr+GznwQOO5hLHj3ii6zT8pqQstRjD VQiA== 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=WIRks3nVLS9d6KKur4AffTf9YL+QSdyJatjT6z+hdt8=; b=apefC/chY0Mbea9vymVV0/H8c3T054xSWJD5d9OEPK8wwjS/0qQiHGSjC71HrifKSe cSwG/fjVBhk+mkU4XLqJnqLw+9zvV+xdLsLZKrdCNqyzmO4X/2gZLE3vNDw1x+3+k4/D gksXnr5QHHZcGvQgAU0mmVy8Qi+9FvA3UaAtg8j5D9cIdbGuWD4tCNLlU6jLbuAczCzY NtyTUP6cqe6aPHgbJBmcoSdJdzuSbw+LtrsP5Sy4INTlkcu9c1uJtYmJIFCAaX8S4Wwk VarnHhDFEUuGtSvinHhJlcxdyckBgwI/dQs8XglHXW3M+lmny80hvR62I0QqJnQzoKNV fu1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tqKwzUiR; 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 a42si3579700edf.129.2020.11.17.05.23.07; Tue, 17 Nov 2020 05:23:30 -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=tqKwzUiR; 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 S1730836AbgKQNVI (ORCPT + 99 others); Tue, 17 Nov 2020 08:21:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:54750 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730824AbgKQNVF (ORCPT ); Tue, 17 Nov 2020 08:21:05 -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 B46152464E; Tue, 17 Nov 2020 13:21:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605619265; bh=wjNwfYlUfR5/nAez3SWIMYvLe24Zu7xaKkTQKgEDCig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tqKwzUiR1n/f80S41v0yUDxproVF814NZTuwpbWwAx1QKDysB2VzfFoIHX18XVNxp GKgDPvXrF0HJcADNmnbeIcrpg5fnpy3bESnqrE3jO7knfOQnhAKdgmJzQBE2wupyhD fFHxppMZFENNWVLeB1rzIJJAuo8O9yP3ey+uv/oU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, stable@vger.kerne.org, Coiby Xu , Hans de Goede , Linus Walleij Subject: [PATCH 4.19 084/101] pinctrl: amd: fix incorrect way to disable debounce filter Date: Tue, 17 Nov 2020 14:05:51 +0100 Message-Id: <20201117122117.218348279@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 06abe8291bc31839950f7d0362d9979edc88a666 upstream. The correct way to disable debounce filter is to clear bit 5 and 6 of the register. Cc: stable@vger.kerne.org Signed-off-by: Coiby Xu Reviewed-by: Hans de Goede Cc: Hans de Goede Link: https://lore.kernel.org/linux-gpio/df2c008b-e7b5-4fdd-42ea-4d1c62b52139@redhat.com/ Link: https://lore.kernel.org/r/20201105231912.69527-2-coiby.xu@gmail.com Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman --- drivers/pinctrl/pinctrl-amd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/pinctrl/pinctrl-amd.c +++ b/drivers/pinctrl/pinctrl-amd.c @@ -167,14 +167,14 @@ static int amd_gpio_set_debounce(struct pin_reg |= BIT(DB_TMR_OUT_UNIT_OFF); pin_reg |= BIT(DB_TMR_LARGE_OFF); } else { - pin_reg &= ~DB_CNTRl_MASK; + pin_reg &= ~(DB_CNTRl_MASK << DB_CNTRL_OFF); ret = -EINVAL; } } else { pin_reg &= ~BIT(DB_TMR_OUT_UNIT_OFF); pin_reg &= ~BIT(DB_TMR_LARGE_OFF); pin_reg &= ~DB_TMR_OUT_MASK; - pin_reg &= ~DB_CNTRl_MASK; + pin_reg &= ~(DB_CNTRl_MASK << DB_CNTRL_OFF); } writel(pin_reg, gpio_dev->base + offset * 4); raw_spin_unlock_irqrestore(&gpio_dev->lock, flags);