]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 16 Sep 2022 08:53:23 +0000 (10:53 +0200)
commit465a9d736e21c8d0725d108ab9ce0a26b960c239
treecf0a566ece8cc0eeaa5422376e607e5bd3dbaba1
parent0def4c3bfd1fe6317041653f336b7f65c8f5bb8a
gpio: pca953x: use the correct range when do regmap sync

BugLink: https://bugs.launchpad.net/bugs/1988479
[ Upstream commit 2abc17a93867dc816f0ed9d32021dda8078e7330 ]

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: b76574300504 ("gpio: pca953x: Restore registers after suspend/resume cycle")
Fixes: ec82d1eba346 ("gpio: pca953x: Zap ad-hoc reg_output cache")
Fixes: 0f25fda840a9 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpio/gpio-pca953x.c