diff options
author | Haibo Chen <haibo.chen@nxp.com> | 2022-07-18 16:31:41 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-29 17:28:08 +0200 |
commit | a96011ba569a0e4cbfa4ca45652ce8c8b4338f00 (patch) | |
tree | 6734a015790ff667a6745882f6e025ef12c65272 /drivers | |
parent | f9f7445242e270b4cfa50dd0a5e245943f2850fd (diff) | |
download | linux-stable-a96011ba569a0e4cbfa4ca45652ce8c8b4338f00.tar.gz linux-stable-a96011ba569a0e4cbfa4ca45652ce8c8b4338f00.tar.bz2 linux-stable-a96011ba569a0e4cbfa4ca45652ce8c8b4338f00.zip |
gpio: pca953x: only use single read/write for No AI mode
[ Upstream commit db8edaa09d7461ec08672a92a2eef63d5882bb79 ]
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: 49427232764d ("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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/gpio-pca953x.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index 33683295a0bf..f334c8556a22 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -351,6 +351,9 @@ static const struct regmap_config pca953x_i2c_regmap = { .reg_bits = 8, .val_bits = 8, + .use_single_read = true, + .use_single_write = true, + .readable_reg = pca953x_readable_register, .writeable_reg = pca953x_writeable_register, .volatile_reg = pca953x_volatile_register, |