gpio: pca953x: use the correct register address when regcache sync during init
authorHaibo Chen <haibo.chen@nxp.com>
Mon, 18 Jul 2022 08:31:43 +0000 (16:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:25:20 +0000 (17:25 +0200)
commitcaae64d3e91b1ebd861bccebd08ea520ec8227e0
tree8792b543b6285d45f22d97b7c17d0d82241ad101
parentdfb4b67ff4df56787694d178d0defb996f24cdfc
gpio: pca953x: use the correct register address when regcache sync during init

[ Upstream commit b8c768ccdd8338504fb78370747728d5002b1b5a ]

For regcache_sync_region, we need to use pca953x_recalc_addr() to get
the real register address.

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>
drivers/gpio/gpio-pca953x.c