Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1500757pxa; Fri, 28 Aug 2020 14:33:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlInVpsxup2lwBRXvxooYJsHsKQmXQruMDlchwBSFsOsttBEwz9r8066aASRJLjwQteYmU X-Received: by 2002:a50:bf4a:: with SMTP id g10mr767691edk.188.1598650423818; Fri, 28 Aug 2020 14:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598650423; cv=none; d=google.com; s=arc-20160816; b=i4Y559zkhp440FeR2oMzmMItpsx2+LJpCRN9W8/RkGZyURsX6fzjaYjuCym9AsFMZC 5oH/Im9DDL9k0skWKWf7v02ZriksqY1BCSX6eNoRJ/zckzfGDY7jZDCzL2QVaFKpE1ZT p1hNM8FQJfj520a/3CAyM+JHVcDfroowaggyDRKmVRB8JfwmdR+cCG17HjFfBIvYoKa8 Ix6/QxrVp/RgMO7F/J8JvO1sgajOR3kD2agQkP2US/6RcVwg52YLFnT25pxXR/fEKJfQ x8jOK6QeIiSs2tAvvWMCTnNDsvULq0jLyVhgT2pKFqrzCr3WkPKLxdCtnSwCPB3fCfRA ZJYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=WoDpRkTvTeQDnnomgzVSR5bneVb3hzpILcE2hNc1ybw=; b=NktYYhyn6ftGUMtehk6vhVYOeR5VoJag6BqYhRSly1Yc1K21Wenyw88uoxhHPz9Nb6 WdqLKC7nX+OprPt/OLWPrxM8nE7oggVOTzLprYVxDnXCCRMsRMDllgyZ/OGdtI+/nos/ id84B+oomnKYI01PsOQ7dwVL0wY4BavqJ//lAeTMaHeIaCfqzijfdbODgJ2GZ00Jbc86 OupdrlDh2XTGx6LRxWPiJDfaBfIBTzigy6VmiNZEvbQolOpgmsKzuqewi4hZPI/hMT0r VEeWPGwTDRIdoAs5QHvGvpzBiGMm9VY/gL4WuiB2O2dFCiPBUCGIEMCpMn5OlCHbzW0J ujBQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si223315edn.390.2020.08.28.14.33.21; Fri, 28 Aug 2020 14:33:43 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727003AbgH1Vcs (ORCPT + 99 others); Fri, 28 Aug 2020 17:32:48 -0400 Received: from imap2.colo.codethink.co.uk ([78.40.148.184]:60590 "EHLO imap2.colo.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726594AbgH1Vcr (ORCPT ); Fri, 28 Aug 2020 17:32:47 -0400 Received: from [188.210.212.0] (helo=localhost.localdomain) by imap2.colo.codethink.co.uk with esmtpsa (Exim 4.92 #3 (Debian)) id 1kBlzE-0001C9-N6; Fri, 28 Aug 2020 22:32:40 +0100 From: Thomas Preston To: linus.walleij@linaro.org, sre@kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, andriy.shevchenko@linux.intel.com, jan.kundrat@cesnet.cz, preid@electromag.com.au Cc: thomas.preston@codethink.co.uk Subject: [PATCH v2 2/2] pinctrl: mcp23s08: Fix mcp23x17 precious range Date: Fri, 28 Aug 2020 22:32:26 +0100 Message-Id: <20200828213226.1734264-3-thomas.preston@codethink.co.uk> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200828213226.1734264-1-thomas.preston@codethink.co.uk> References: <20200828213226.1734264-1-thomas.preston@codethink.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 87cde8fb08dd9..7edb067f5e76a 100644 --- a/drivers/pinctrl/pinctrl-mcp23s08.c +++ b/drivers/pinctrl/pinctrl-mcp23s08.c @@ -109,7 +109,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, }; -- 2.26.2