Commit e1502129 authored by Haibo Chen's avatar Haibo Chen Committed by Zheng Zengkai
Browse files

gpio: pca953x: use the correct range when do regmap sync

stable inclusion
from stable-v5.10.134
commit a941e6d5ba3bf989b48490abed9e68d135b44c9b
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZVR7

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a941e6d5ba3bf989b48490abed9e68d135b44c9b



--------------------------------

[ Upstream commit 2abc17a9 ]

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: b7657430 ("gpio: pca953x: Restore registers after suspend/resume cycle")
Fixes: ec82d1eb ("gpio: pca953x: Zap ad-hoc reg_output cache")
Fixes: 0f25fda8 ("gpio: pca953x: Zap ad-hoc reg_direction cache")
Signed-off-by: default avatarHaibo Chen <haibo.chen@nxp.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent 03272008
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment