From: Thomas Preston <thomas.preston@codethink.co.uk>
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 [thread overview]
Message-ID: <20200828213226.1734264-3-thomas.preston@codethink.co.uk> (raw)
In-Reply-To: <20200828213226.1734264-1-thomas.preston@codethink.co.uk>
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 <thomas.preston@codethink.co.uk>
---
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
next prev parent reply other threads:[~2020-08-28 21:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-28 21:32 [PATCH v2 0/2] pinctrl: mcp23s08: Fixups for mcp23x17 Thomas Preston
2020-08-28 21:32 ` [PATCH v2 1/2] pinctrl: mcp23s08: Fix mcp23x17_regmap initialiser Thomas Preston
2020-08-28 21:32 ` Thomas Preston [this message]
2020-08-30 17:43 ` [PATCH v2 2/2] pinctrl: mcp23s08: Fix mcp23x17 precious range Andy Shevchenko
2020-08-30 17:44 ` [PATCH v2 0/2] pinctrl: mcp23s08: Fixups for mcp23x17 Andy Shevchenko
2020-09-12 9:31 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200828213226.1734264-3-thomas.preston@codethink.co.uk \
--to=thomas.preston@codethink.co.uk \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jan.kundrat@cesnet.cz \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=preid@electromag.com.au \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).