Commit a3c2c5c9 authored by Kaustabh Chakraborty's avatar Kaustabh Chakraborty Committed by Jonathan Cameron
Browse files

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: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarKaustabh Chakraborty <kauschluss@disroot.org>
Link: https://patch.msgid.link/20240625082800.62305-1-kauschluss@disroot.org


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent fd2adf37
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
		}
	}