mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: 8f38910ba4 ("pinctrl: mcp23s08: switch to regmap caching")
Tested-by: Phil Reid <[email protected]>
Signed-off-by: Dmitry Mastykin <[email protected]>
Reviewed-by: Sebastian Reichel <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
6afb10267c
commit
5986170107
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
else {
|
||||
mcp->cached_gpio = status;
|
||||
status = !!(status & (1 << offset));
|
||||
|
||||
mcp->cached_gpio = status;
|
||||
}
|
||||
|
||||
mutex_unlock(&mcp->lock);
|
||||
return status;
|
||||
|
|
|
|||
Loading…
Reference in a new issue