From: Kaustabh Chakraborty Date: Tue, 25 Jun 2024 08:27:55 +0000 (+0530) Subject: iio: st_sensors: relax WhoAmI check in st_sensors_verify_id() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a3c2c5c937ed7562b6d120670f2743e979c05881;p=users%2Fjedix%2Flinux-maple.git 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 Signed-off-by: Kaustabh Chakraborty Link: https://patch.msgid.link/20240625082800.62305-1-kauschluss@disroot.org Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c index c77d7bdcc1216..c69399ac66572 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; } }