Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3877641pxb; Tue, 17 Nov 2020 06:02:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3NHd+cQjRYZkmzpyyaBakFAbebpKmxwWwauQJ/zXQJkMytBdIe6eUNvB3DMZzh5m5CJQI X-Received: by 2002:a05:6512:3711:: with SMTP id z17mr1584364lfr.350.1605621769560; Tue, 17 Nov 2020 06:02:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605621769; cv=none; d=google.com; s=arc-20160816; b=hftTw18FnCPO2EZkdSUYw83rTD6g6q/MJ7fbWnkFWo4HsJnsU13cqVW3k2OsZ4TzSO 39j+5jKE5TvSLhdPsCxYUmr5FHxcHTUurIwGXafuJmcL9TfeHhjG/mVYJ/MpzKi+zmiq ByhNv2APBY0pzPOaZQxYcIchw6Yc9LY+CenvXkFvD4h7mjCIE1gFfrydYWwEGp4ahhUT fB313epHdj/4BhZcWdeqlvEzzvXW+xGU/iJuGhhYwqg47k5cZSxzfQZyUPPcORa7yB7c MpyWgC753DN8B/u/KU510USi42zM0NW52qRXGKtx2epL9iBxMOwiXpYjEE3nqD+OVPl2 V68g== 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=eaez77gZOmZC/YB3hAZjWbenKqmZb9Ww4rwhMIY1exQ=; b=uOkOjk93m74cZL3TUCoAOtZBM555SMNYu5jY5MRrqKuF/7TSWhxtR09eubrQhVRiyD O2jPM4pb5XSrrXwPzjPXeIc2NJo9StEfX77COvaaT9sgMUzqD0eNptyKqfuF2I1vi8Nj SOo2wBqIWIKqMg/F4tIQOFIvJ0/7kSsJNnuYqcdSkBarnY+5f1C+KFXzDs1Wo2Q4vbYL FdE0YgUgUC2tggsTSS2PsFLiXu55v+KnvqaP4BOS5Brzqj9z/UirUh+qXssTy9BiZaG5 5Ec2wBVvoz/KIMFTo354W4P7xLK71jlbdKV7VXhHQItVvfdAy8LQFIDceVbk1rJC4M8F iJYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aT3xsNg+; 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 d18si13337717ejr.174.2020.11.17.06.02.24; Tue, 17 Nov 2020 06:02:49 -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=aT3xsNg+; 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 S1730193AbgKQNPc (ORCPT + 99 others); Tue, 17 Nov 2020 08:15:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:46992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729022AbgKQNPb (ORCPT ); Tue, 17 Nov 2020 08:15:31 -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 EEF952225B; Tue, 17 Nov 2020 13:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605618930; bh=aXUGh1UxMukFxGGR6UQY36C2S57jrM7cADPoatME4Nw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aT3xsNg+VyKF+FtRjvsdJYWcYB8H+vdVdlM6Bc367+jDjtIv2zNpbd04fBad0xIcz bcSCDr4dx9djtKU/xQZupVvY5+dI56rcl3YH7JgrrlzIJsvZJnhQnpmi0wlsbERRQq 2XfXFY5YdUqZQWnYCI3/y4//t7WFIWFFMh0O9LGk= 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.14 56/85] pinctrl: amd: fix incorrect way to disable debounce filter Date: Tue, 17 Nov 2020 14:05:25 +0100 Message-Id: <20201117122113.774287792@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 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 @@ -154,14 +154,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);