]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: pca953x: use the correct range when do regmap sync
authorHaibo Chen <haibo.chen@nxp.com>
Mon, 18 Jul 2022 08:31:42 +0000 (16:31 +0800)
committerBartosz Golaszewski <brgl@bgdev.pl>
Tue, 19 Jul 2022 09:19:16 +0000 (11:19 +0200)
commitf89d842995a719fac41e2f1df2b2ed93918dd440
tree612b4e4f94c4bff67e4ad1b23326c8d3a1d491a0
parentde71cac2e9db1850f7b90d283b46b1eb6d591ae1
gpio: pca953x: use the correct range when do regmap sync

regmap will sync a range of registers, here use the correct range
to make sure the sync do not touch other unexpected registers.

Find on pca9557pw on imx8qxp/dxl evk board, this device support
8 pin, so only need one register(8 bits) to cover all the 8 pins's
property setting. But when sync the output, we find it actually
update two registers, output register and the following register.

Fixes: eb22e835f4d8 ("gpio: pca953x: Restore registers after suspend/resume cycle")
Fixes: a86b26974625 ("gpio: pca953x: Zap ad-hoc reg_output cache")
Fixes: 5c79df6a8002 ("gpio: pca953x: Zap ad-hoc reg_direction cache")
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-pca953x.c