]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: dac: ad3552r-hs: fix message on wrong chip id
authorAngelo Dureghello <adureghello@baylibre.com>
Tue, 14 Jan 2025 15:30:14 +0000 (16:30 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 8 Feb 2025 15:10:14 +0000 (15:10 +0000)
Set a better info message on wrong chip id, fixing the expected value as
read from the info struct.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
Link: https://patch.msgid.link/20250114-wip-bl-ad3552r-axi-v0-iio-testing-carlos-v4-5-979402e33545@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dac/ad3552r-hs.c

index 8974df6256708152ce76addba2af43233186504f..6bf995b503958eb53bd756d0722a717706cec04d 100644 (file)
@@ -326,8 +326,9 @@ static int ad3552r_hs_setup(struct ad3552r_hs_state *st)
 
        id |= val << 8;
        if (id != st->model_data->chip_id)
-               dev_info(st->dev, "Chip ID error. Expected 0x%x, Read 0x%x\n",
-                        AD3552R_ID, id);
+               dev_warn(st->dev,
+                        "chip ID mismatch, detected 0x%x but expected 0x%x\n",
+                        id, st->model_data->chip_id);
 
        /* Clear reset error flag, see ad3552r manual, rev B table 38. */
        ret = st->data->bus_reg_write(st->back, AD3552R_REG_ADDR_ERR_STATUS,