gpio: pca953x: use the correct register address to do regcache sync
authorHaibo Chen <haibo.chen@nxp.com>
Mon, 30 May 2022 10:48:48 +0000 (18:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:13 +0000 (18:36 +0200)
commit0c6cd71caa7c2efbfc56a521495b435d93df4787
treeba3ccc0a0ae4e07baab4a972b9226c2a25b44a1f
parentcedca5b2f08bc706ad426d45c022d50ab12d58d0
gpio: pca953x: use the correct register address to do regcache sync

[ Upstream commit 43624eda86c98b0de726d0b6f2516ccc3ef7313f ]

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

Fixes: b76574300504 ("gpio: pca953x: Restore registers after suspend/resume cycle")
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpio/gpio-pca953x.c