Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59861701 authored by Dmitry Mastykin's avatar Dmitry Mastykin Committed by Linus Walleij
Browse files

pinctrl: mcp23s08: fix interrupt handling regression



interrupt handling was broken with conversion to using regmap caching.
cached_gpio value was updated by boolean status instead of gpio reading.

Fixes: 8f38910b ("pinctrl: mcp23s08: switch to regmap caching")
Tested-by: default avatarPhil Reid <preid@electromag.com.au>
Signed-off-by: default avatarDmitry Mastykin <mastichi@gmail.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 6afb1026
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -407,10 +407,10 @@ static int mcp23s08_get(struct gpio_chip *chip, unsigned offset)
	ret = mcp_read(mcp, MCP_GPIO, &status);
	if (ret < 0)
		status = 0;
	else
		status = !!(status & (1 << offset));

	else {
		mcp->cached_gpio = status;
		status = !!(status & (1 << offset));
	}

	mutex_unlock(&mcp->lock);
	return status;