lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240526132422.01d3855b@jic23-huawei>
Date: Sun, 26 May 2024 13:24:22 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Denis Benato <benato.denis96@...il.com>
Cc: Jagath Jog J <jagathjog1996@...il.com>, Lars-Peter Clausen
 <lars@...afoo.de>, "Luke D . Jones" <luke@...nes.dev>, Jonathan LoBue
 <jlobue10@...il.com>, linux-iio@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] iio: imu: bmi323: Use iio read_acpi_mount_matrix()
 helper

On Thu, 23 May 2024 19:47:36 +0200
Denis Benato <benato.denis96@...il.com> wrote:

> bmi150-accel and bmi323-imu are declared in an almost identical way in the ACPI and in some devices such as the Asus RC71L the "ROTM" property can be found: parse and use the ACPI-defined mount-matrix.
> 
> Co-developed-by: Luke D. Jones <luke@...nes.dev>
> Co-developed-by: Jonathan LoBue <jlobue10@...il.com>
> Signed-off-by: Denis Benato <benato.denis96@...il.com>
Applied.

Thanks,

Jonathan

> ---
>  drivers/iio/imu/bmi323/bmi323_core.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/imu/bmi323/bmi323_core.c b/drivers/iio/imu/bmi323/bmi323_core.c
> index 5d42ab9b176a..b391e5e701b1 100644
> --- a/drivers/iio/imu/bmi323/bmi323_core.c
> +++ b/drivers/iio/imu/bmi323/bmi323_core.c
> @@ -2083,9 +2083,11 @@ int bmi323_core_probe(struct device *dev)
>  	if (ret)
>  		return -EINVAL;
>  
> -	ret = iio_read_mount_matrix(dev, &data->orientation);
> -	if (ret)
> -		return ret;
> +	if (!iio_read_acpi_mount_matrix(dev, &data->orientation, "ROTM")) {
> +		ret = iio_read_mount_matrix(dev, &data->orientation);
> +		if (ret)
> +			return ret;
> +	}
>  
>  	indio_dev->name = "bmi323-imu";
>  	indio_dev->info = &bmi323_info;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ