From c051d08d98771132868abf0cb95b6de95ab3060a Mon Sep 17 00:00:00 2001 From: Antoniu Miclaus Date: Tue, 22 Sep 2026 14:09:58 +0300 Subject: [PATCH] iio: adc: ad4080: enable address ascension for chip identification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two byte bulk read at AD4080_REG_PRODUCT_ID_L expects PRODUCT_ID_L followed by PRODUCT_ID_H. After a software reset the AD408x defaults to descending address mode, so the second byte comes from CHIP_TYPE (0x03) instead. CHIP_TYPE reads 0x07 on all AD408x parts, so an AD4080 reports 0x0750 rather than 0x0050 and every part logs "Unrecognized CHIP_ID". Set ADDR_ASC along with SDO_ENABLE before the read. This is the only multi byte transfer in the driver, so no other access is affected. Fixes: b66cddc8be72 ("iio: adc: ad4080: fix chip identification") Signed-off-by: Antoniu Miclaus Reviewed-by: Nuno Sá Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron --- drivers/iio/adc/ad4080.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad4080.c b/drivers/iio/adc/ad4080.c index 4843ecdd91a8..4ed82aa42400 100644 --- a/drivers/iio/adc/ad4080.c +++ b/drivers/iio/adc/ad4080.c @@ -710,7 +710,8 @@ static int ad4080_setup_channel(struct ad4080_state *st, unsigned int ch) return ret; ret = regmap_write(st->regmap[ch], AD4080_REG_INTERFACE_CONFIG_A, - AD4080_INTERFACE_CONFIG_A_SDO_ENABLE); + AD4080_INTERFACE_CONFIG_A_SDO_ENABLE | + AD4080_INTERFACE_CONFIG_A_ADDR_ASC); if (ret) return ret;