]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: pca953x: only use single read/write for No AI mode
authorHaibo Chen <haibo.chen@nxp.com>
Mon, 18 Jul 2022 08:31:41 +0000 (16:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:14:14 +0000 (17:14 +0200)
commit5f587f728b863482e5aea1258f2625888de26d8c
tree4b704050b0a3ff42dfad28bab9a878db70e76dd6
parent7256da8eb1d4eef5256b4f1166128034028e52ea
gpio: pca953x: only use single read/write for No AI mode

[ Upstream commit dc7c28f85c2ff5d9c674a00242b5038b6a436575 ]

For the device use NO AI mode(not support auto address increment),
only use the single read/write when config the regmap.

We meet issue on PCA9557PW on i.MX8QXP/DXL evk board, this device
do not support AI mode, but when do the regmap sync, regmap will
sync 3 byte data to register 1, logically this means write first
data to register 1, write second data to register 2, write third data
to register 3. But this device do not support AI mode, finally, these
three data write only into register 1 one by one. the reault is the
value of register 1 alway equal to the latest data, here is the third
data, no operation happened on register 2 and register 3. This is
not what we expect.

Fixes: 8ab8aaf83e5a ("gpio: pca953x: Perform basic regmap conversion")
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