Skip to content

Commit db8edaa

Browse files
Haibo Chenbrgl
authored andcommitted
gpio: pca953x: only use single read/write for No AI mode
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: 4942723 ("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>
1 parent ff69927 commit db8edaa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpio/gpio-pca953x.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,9 @@ static const struct regmap_config pca953x_i2c_regmap = {
351351
.reg_bits = 8,
352352
.val_bits = 8,
353353

354+
.use_single_read = true,
355+
.use_single_write = true,
356+
354357
.readable_reg = pca953x_readable_register,
355358
.writeable_reg = pca953x_writeable_register,
356359
.volatile_reg = pca953x_volatile_register,

0 commit comments

Comments
 (0)