linux/drivers/iio/potentiometer
Lukas Schmid 85e4614524 iio: potentiometer: mcp4131: fix double application of wiper shift
The MCP4131 wiper address is shifted twice when preparing the SPI
command in mcp4131_write_raw().

The address is already shifted when assigned to the local variable
"address", but is then shifted again when written to data->buf[0].
This results in an incorrect command being sent to the device and
breaks wiper writes to the second channel.

Remove the second shift and use the pre-shifted address directly
when composing the SPI transfer.

Fixes: 22d199a539 ("iio: potentiometer: add driver for Microchip MCP413X/414X/415X/416X/423X/424X/425X/426X")
Signed-off-by: Lukas Schmid <lukas.schmid@netcube.li>#
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2026-02-23 08:24:37 +00:00
..
ad5110.c iio: potentiometer: ad5110: Use i2c_get_match_data() 2023-09-12 10:42:03 +01:00
ad5272.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ds1803.c iio: potentiometer: Drop unused export.h includes 2025-06-26 19:32:52 +01:00
Kconfig iio: potentiometer: Add support for the Renesas X9250 potentiometers 2023-05-20 17:30:33 +01:00
Makefile iio: potentiometer: Add support for the Renesas X9250 potentiometers 2023-05-20 17:30:33 +01:00
max5432.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
max5481.c iio: potentiometer: max5481: Fix alignment for DMA safety 2022-06-14 11:53:19 +01:00
max5487.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
mcp4018.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
mcp4131.c iio: potentiometer: mcp4131: fix double application of wiper shift 2026-02-23 08:24:37 +00:00
mcp4531.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
mcp41010.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
tpl0102.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
x9250.c iio: potentiometer: Add support for the Renesas X9250 potentiometers 2023-05-20 17:30:33 +01:00