summaryrefslogtreecommitdiff
path: root/drivers/iio/common
diff options
context:
space:
mode:
authorKaustabh Chakraborty <kauschluss@disroot.org>2024-06-25 13:57:55 +0530
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-06-29 19:44:43 +0100
commita3c2c5c937ed7562b6d120670f2743e979c05881 (patch)
treec6531ea255055df6df10981a66b22aeff90196d9 /drivers/iio/common
parentfd2adf37c26593f3e4587bfa824bac64b1149b33 (diff)
iio: st_sensors: relax WhoAmI check in st_sensors_verify_id()
Hard matching against the WhoAmI values isn't ideal for using devices which are compatible with existing ones. Instead of raising an error, issue a warning instead, thus allowing the driver to continue probing. Suggested-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org> Link: https://patch.msgid.link/20240625082800.62305-1-kauschluss@disroot.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/common')
-rw-r--r--drivers/iio/common/st_sensors/st_sensors_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c
index c77d7bdcc121..c69399ac6657 100644
--- a/drivers/iio/common/st_sensors/st_sensors_core.c
+++ b/drivers/iio/common/st_sensors/st_sensors_core.c
@@ -606,10 +606,9 @@ int st_sensors_verify_id(struct iio_dev *indio_dev)
}
if (sdata->sensor_settings->wai != wai) {
- dev_err(&indio_dev->dev,
+ dev_warn(&indio_dev->dev,
"%s: WhoAmI mismatch (0x%x).\n",
indio_dev->name, wai);
- return -EINVAL;
}
}