Commit 5c326638 authored by Denis Benato's avatar Denis Benato Committed by Jonathan Cameron

iio: imu: bmi323: Use iio read_acpi_mount_matrix() helper

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: default avatarLuke D. Jones <luke@ljones.dev>
Co-developed-by: default avatarJonathan LoBue <jlobue10@gmail.com>
Signed-off-by: default avatarDenis Benato <benato.denis96@gmail.com>
Link: https://lore.kernel.org/r/20240523174736.16692-2-benato.denis96@gmail.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 33c33a96
...@@ -2083,9 +2083,11 @@ int bmi323_core_probe(struct device *dev) ...@@ -2083,9 +2083,11 @@ int bmi323_core_probe(struct device *dev)
if (ret) if (ret)
return -EINVAL; return -EINVAL;
if (!iio_read_acpi_mount_matrix(dev, &data->orientation, "ROTM")) {
ret = iio_read_mount_matrix(dev, &data->orientation); ret = iio_read_mount_matrix(dev, &data->orientation);
if (ret) if (ret)
return ret; return ret;
}
indio_dev->name = "bmi323-imu"; indio_dev->name = "bmi323-imu";
indio_dev->info = &bmi323_info; indio_dev->info = &bmi323_info;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment