* [PATCH] iio: st_sensors: relax WhoAmI check in st_sensors_verify_id()
@ 2024-06-25 8:27 Kaustabh Chakraborty
2024-06-29 18:44 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Kaustabh Chakraborty @ 2024-06-25 8:27 UTC (permalink / raw)
To: linux-iio, jic23; +Cc: kauschluss
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>
---
drivers/iio/common/st_sensors/st_sensors_core.c | 3 +--
1 file changed, 1 insertion(+), 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;
}
}
--
2.45.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: st_sensors: relax WhoAmI check in st_sensors_verify_id()
2024-06-25 8:27 [PATCH] iio: st_sensors: relax WhoAmI check in st_sensors_verify_id() Kaustabh Chakraborty
@ 2024-06-29 18:44 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2024-06-29 18:44 UTC (permalink / raw)
To: Kaustabh Chakraborty; +Cc: linux-iio, Linus Walleij, Denis Ciocca
On Tue, 25 Jun 2024 13:57:55 +0530
Kaustabh Chakraborty <kauschluss@disroot.org> wrote:
> 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>
LGTM. I've +CC'd a few more people who might take a look.
In meantime I'll queue it up.
Applied to the togreg branch of iio.git and pushed out as testing for
0-day to take a look and see what we missed.
Thanks,
Jonathan
> ---
> drivers/iio/common/st_sensors/st_sensors_core.c | 3 +--
> 1 file changed, 1 insertion(+), 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;
> }
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-29 18:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-25 8:27 [PATCH] iio: st_sensors: relax WhoAmI check in st_sensors_verify_id() Kaustabh Chakraborty
2024-06-29 18:44 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox