diff options
author | Aleksandar Gerasimovski <aleksandar.gerasimovski@belden.com> | 2025-08-11 13:09:04 +0000 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-08-25 10:45:04 +0100 |
commit | 3c63ba1c430af1c0dcd68dd36f2246980621dcba (patch) | |
tree | 0f673afa7ec920b9339464f43014c226eb33b7f6 /rust/helpers/bitmap.c | |
parent | 1b237f190eb3d36f52dffe07a40b5eb210280e00 (diff) |
iio/adc/pac1934: fix channel disable configuration
There are two problems with the chip configuration in this driver:
- First, is that writing 12 bytes (ARRAY_SIZE(regs)) would anyhow
lead to a config overflow due to HW auto increment implementation
in the chip.
- Second, the i2c_smbus_write_block_data write ends up in writing
unexpected value to the channel_dis register, this is because
the smbus size that is 0x03 in this case gets written to the
register. The PAC1931/2/3/4 data sheet does not really specify
that block write is indeed supported.
This problem is probably not visible on PAC1934 version where all
channels are used as the chip is properly configured by luck,
but in our case whenusing PAC1931 this leads to nonfunctional device.
Fixes: 0fb528c8255b (iio: adc: adding support for PAC193x)
Suggested-by: Rene Straub <mailto:rene.straub@belden.com>
Signed-off-by: Aleksandar Gerasimovski <aleksandar.gerasimovski@belden.com>
Reviewed-by: Marius Cristea <marius.cristea@microchip.com>
Link: https://patch.msgid.link/20250811130904.2481790-1-aleksandar.gerasimovski@belden.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'rust/helpers/bitmap.c')
0 files changed, 0 insertions, 0 deletions