* [PATCH] iio: imu: lsm6dsx: Fix mount matrix retrieval
@ 2023-07-12 10:32 Alejandro Tafalla
2023-07-12 11:04 ` Lorenzo Bianconi
0 siblings, 1 reply; 3+ messages in thread
From: Alejandro Tafalla @ 2023-07-12 10:32 UTC (permalink / raw)
To: lorenzo, jic23, lars; +Cc: linux-iio, linux-kernel, ~postmarketos/upstreaming
The function lsm6dsx_get_acpi_mount_matrix should return true when ACPI
support is not enabled to allow executing iio_read_mount_matrix in the
probe function.
Fixes: dc3d25f22b88 ("iio: imu: lsm6dsx: Add ACPI mount matrix retrieval")
Signed-off-by: Alejandro Tafalla <atafalla@dnyon.com>
---
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/
st_lsm6dsx/st_lsm6dsx_core.c
index 6a18b363cf73..62bc3ee783fb 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
@@ -2687,7 +2687,7 @@ static int lsm6dsx_get_acpi_mount_matrix(struct device
*dev,
static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,
struct
iio_mount_matrix *orientation)
{
- return false;
+ return true;
}
#endif
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: imu: lsm6dsx: Fix mount matrix retrieval
2023-07-12 10:32 [PATCH] iio: imu: lsm6dsx: Fix mount matrix retrieval Alejandro Tafalla
@ 2023-07-12 11:04 ` Lorenzo Bianconi
2023-07-12 18:24 ` Alejandro Tafalla
0 siblings, 1 reply; 3+ messages in thread
From: Lorenzo Bianconi @ 2023-07-12 11:04 UTC (permalink / raw)
To: Alejandro Tafalla
Cc: jic23, lars, linux-iio, linux-kernel, ~postmarketos/upstreaming
[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]
> The function lsm6dsx_get_acpi_mount_matrix should return true when ACPI
> support is not enabled to allow executing iio_read_mount_matrix in the
> probe function.
>
> Fixes: dc3d25f22b88 ("iio: imu: lsm6dsx: Add ACPI mount matrix retrieval")
>
> Signed-off-by: Alejandro Tafalla <atafalla@dnyon.com>
> ---
> drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/
> st_lsm6dsx/st_lsm6dsx_core.c
> index 6a18b363cf73..62bc3ee783fb 100644
> --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> @@ -2687,7 +2687,7 @@ static int lsm6dsx_get_acpi_mount_matrix(struct device
> *dev,
> static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,
> struct
> iio_mount_matrix *orientation)
> {
> - return false;
> + return true;
I would say it should return something like -EOPNOTSUPP.
Regards,
Lorenzo
> }
>
> #endif
> --
> 2.41.0
>
>
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: imu: lsm6dsx: Fix mount matrix retrieval
2023-07-12 11:04 ` Lorenzo Bianconi
@ 2023-07-12 18:24 ` Alejandro Tafalla
0 siblings, 0 replies; 3+ messages in thread
From: Alejandro Tafalla @ 2023-07-12 18:24 UTC (permalink / raw)
To: Lorenzo Bianconi
Cc: jic23, lars, linux-iio, linux-kernel, ~postmarketos/upstreaming
On miércoles, 12 de julio de 2023 13:04:05 (CEST) Lorenzo Bianconi wrote:
> > The function lsm6dsx_get_acpi_mount_matrix should return true when ACPI
> > support is not enabled to allow executing iio_read_mount_matrix in the
> > probe function.
> >
> > Fixes: dc3d25f22b88 ("iio: imu: lsm6dsx: Add ACPI mount matrix retrieval")
> >
> > Signed-off-by: Alejandro Tafalla <atafalla@dnyon.com>
> > ---
> >
> > drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> > b/drivers/iio/imu/ st_lsm6dsx/st_lsm6dsx_core.c
> > index 6a18b363cf73..62bc3ee783fb 100644
> > --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> > +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> > @@ -2687,7 +2687,7 @@ static int lsm6dsx_get_acpi_mount_matrix(struct
> > device *dev,
> >
> > static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,
> >
> > struct
> >
> > iio_mount_matrix *orientation)
> >
> > {
> >
> > - return false;
> > + return true;
>
> I would say it should return something like -EOPNOTSUPP.
>
> Regards,
> Lorenzo
>
> > }
> >
> > #endif
Hi, thank you for the review. I'll send a v2 with a better solution that uses
error codes.
Alejandro.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-12 18:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-12 10:32 [PATCH] iio: imu: lsm6dsx: Fix mount matrix retrieval Alejandro Tafalla
2023-07-12 11:04 ` Lorenzo Bianconi
2023-07-12 18:24 ` Alejandro Tafalla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox