From patchwork Tue Oct 27 13:51:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 307073 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72C50C55178 for ; Tue, 27 Oct 2020 17:38:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 188BE2068D for ; Tue, 27 Oct 2020 17:38:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603820298; bh=R/EIdN1dhjZmrIxGGM/69pEOsMpWAkuHLRWJuZBtzB4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=MdExjcMuVuTVDKRocftpu4ecIYL4qU4xloPCu00EBLzvG3fdU88A7VwTrjcYDasBK jnkITdT0cJ85CCVapDyfzYqdamJvUxHP8ewQP4OfZntgQztfg5kzGbwFd+QS5eIbrg euEfNfqCwEBxXINNtmuYYJDnj0nRAnYzLY2pqd2g= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1820782AbgJ0RiQ (ORCPT ); Tue, 27 Oct 2020 13:38:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:33726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760530AbgJ0Oe4 (ORCPT ); Tue, 27 Oct 2020 10:34:56 -0400 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 516ED20709; Tue, 27 Oct 2020 14:34:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809296; bh=R/EIdN1dhjZmrIxGGM/69pEOsMpWAkuHLRWJuZBtzB4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XJgdmon7vAHF8UQDSF9QICZ0p6qCMjFD+s1Tjgn6QGydxr5AG48WvgQVz1F+ddEkJ W6Bu6Wd2AelujR8fSFs9IefjsYVqaGiuLnxas69ZwefkQT3fEFIw8VDCCa6i61UueG E1U6J6t7zK4V1488fm/Vag3K/sy9hTWvgwtNt1UY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Preston , Andy Shevchenko , Linus Walleij , Sasha Levin Subject: [PATCH 5.4 144/408] pinctrl: mcp23s08: Fix mcp23x17 precious range Date: Tue, 27 Oct 2020 14:51:22 +0100 Message-Id: <20201027135501.782000290@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Thomas Preston [ Upstream commit b9b7fb29433b906635231d0a111224efa009198c ] On page 23 of the datasheet [0] it says "The register remains unchanged until the interrupt is cleared via a read of INTCAP or GPIO." Include INTCAPA and INTCAPB registers in precious range, so that they aren't accidentally cleared when we read via debugfs. [0] https://ww1.microchip.com/downloads/en/DeviceDoc/20001952C.pdf Fixes: 8f38910ba4f6 ("pinctrl: mcp23s08: switch to regmap caching") Signed-off-by: Thomas Preston Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200828213226.1734264-3-thomas.preston@codethink.co.uk Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/pinctrl-mcp23s08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c index 676ff9a4459e3..d8bcbefcba890 100644 --- a/drivers/pinctrl/pinctrl-mcp23s08.c +++ b/drivers/pinctrl/pinctrl-mcp23s08.c @@ -144,7 +144,7 @@ static const struct regmap_access_table mcp23x17_volatile_table = { }; static const struct regmap_range mcp23x17_precious_range = { - .range_min = MCP_GPIO << 1, + .range_min = MCP_INTCAP << 1, .range_max = MCP_GPIO << 1, };