iio: amplifiers: ada4250: don't fail on bad chip ID

Only print an information message instead of error message and failing
to probe the device if the chip ID is not recognized. Experience shows
that this can be fragile and some devices may not return the expected
chip ID even though the driver is still able to work with them.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Closes: https://lore.kernel.org/linux-iio/20250421122409.79f5580c@jic23-huawei/
Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250611-iio-amplifiers-ada4250-simplify-data-buffer-in-init-v3-2-bf85ddea79f2@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
David Lechner
2025-06-11 16:33:02 -05:00
committed by Jonathan Cameron
parent 788d6060f1
commit f8a7be248f
+2 -4
View File
@@ -332,10 +332,8 @@ static int ada4250_init(struct ada4250_state *st)
chip_id = le16_to_cpu(st->reg_val_16);
if (chip_id != ADA4250_CHIP_ID) {
dev_err(dev, "Invalid chip ID.\n");
return -EINVAL;
}
if (chip_id != ADA4250_CHIP_ID)
dev_info(dev, "Invalid chip ID: 0x%02X.\n", chip_id);
return regmap_write(st->regmap, ADA4250_REG_REFBUF_EN,
FIELD_PREP(ADA4250_REFBUF_MSK, st->refbuf_en));