Skip to content

Commit

Permalink
pinctrl: mcp23s08: Fix mcp23x17 precious range
Browse files Browse the repository at this point in the history
[ Upstream commit b9b7fb2 ]

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: 8f38910 ("pinctrl: mcp23s08: switch to regmap caching")
Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200828213226.1734264-3-thomas.preston@codethink.co.uk
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Thomas Preston authored and gregkh committed Oct 29, 2020
1 parent 5e829cd commit 50185a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-mcp23s08.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down

0 comments on commit 50185a1

Please sign in to comment.