Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3843465pxb; Tue, 17 Nov 2020 05:12:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/TxP/b+qrYFPQfM9ji6kt7n7s+5pTluv2d+nUmQajN8I8ZJ7p9IFXF6SgUhBG/6rapcW1 X-Received: by 2002:a17:906:3b91:: with SMTP id u17mr17995039ejf.499.1605618736276; Tue, 17 Nov 2020 05:12:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605618736; cv=none; d=google.com; s=arc-20160816; b=We98G0pp3phKmeG7C65xh8X72BN9Fj7qqwUebw261DQdkRlpC8ij4hjtDqBvEkHwub aRA2dW81B++ZGN4n4/6agUwNVlGEti4JBCvYuHCo/qY1IZgu3THyX24ylWShschffRzn KpZxBkuEkEoqTg55NFVlF/TCVpJK69n+5HsAi3saqNEraOULFeC49iLC4wPChj5jknvo sDhfLNa9G6eZ9QcFbxssWzwK0NBYBQVbw84qVNTOn//d8yo5rhFsFHS6SY+DS1hrQv5x aEWqD3I9BGbt1l7X+Loy1ddSFw3wUUme5bp4xk8MOmreQcTPcSdqGCMXho5/db5LAdM4 VsHg== 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=aFXO1C043Ekf92J8GHK1kWaZUW/hepJk8U0W1GKLRDA=; b=lwEk9SahtM1vm0MmCKprqIJ9BmwDjy6ZfT5aeM/ToysHNmcunqlKG5FAcXQQwDZy/e jeWqcLIoi7bqxrf83gHiWm89XHw6tSw5a5+trML0XX2xELaHyTDQJXXiLcKY+s40INFO NqojodJIbsJoI2vgDm2QVjAaBoAGWErApoTAENUGQcbox1QMz7NyyOlQ9Gx+8xfj2mjl K86UkJr984Q7X3oLwSlyf8gAAx1QhXTPg8d8Zmo1PS65uFaZiEdVM5/rxLfAtyyRk4JE iYczccWlDCCJjozBbKdKpNuIFcwZM5aBHJA1NJCYiOdhocv5oU1IkoQjIcALiC5ogkAw l0pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MvQMPUou; 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 dm21si13670159edb.492.2020.11.17.05.11.52; Tue, 17 Nov 2020 05:12:16 -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=MvQMPUou; 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 S1729156AbgKQNHo (ORCPT + 99 others); Tue, 17 Nov 2020 08:07:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:35326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729126AbgKQNHi (ORCPT ); Tue, 17 Nov 2020 08:07:38 -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 009E724698; Tue, 17 Nov 2020 13:07:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605618457; bh=E/ylpNjfTYnYrW8Ivjb7kMwyCcrIvyGzkZxCdGnehTw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MvQMPUoud2+z7hn6EmPv3AuzMfWKHqFTjhnlWpeLr/HIPOaqq0aAdP/nESmtbP6RN WaFaJkfbAaKyU94PGC7xJ+xkVISkVqrl02wDltrz3Qcyfc2XCZRnx/Y0R+hdF+4FHw 7SBOgfR7Ijz5wuS10Im+dLmVTcaEu9jmYcIAIsck= 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.4 40/64] pinctrl: amd: fix incorrect way to disable debounce filter Date: Tue, 17 Nov 2020 14:05:03 +0100 Message-Id: <20201117122108.143061960@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 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); spin_unlock_irqrestore(&gpio_dev->lock, flags);