iio: adc: adi-axi-adc: fix ad7606_bus_reg_read()
Mask the value read before returning it. The value read over the parallel bus via the AXI ADC IP block contains both the address and the data, but callers expect val to only contain the data. axi_adc_raw_write() takes a u32 parameter, so addr was the wrong type. This wasn't causing any issues but is corrected anyway since we are touching the same line to add a new variable. Cc: stable@vger.kernel.org Fixes: 79c47485 ("iio: adc: adi-axi-adc: add support for AD7606 register writing") Signed-off-by:David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250530-iio-adc-adi-axi-adc-fix-ad7606_bus_reg_read-v2-1-ad2dfc0694ce@baylibre.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Loading
Please sign in to comment