On Tue, May 18, 2021 at 01:33:19AM +0200, Linus Walleij wrote: > The ST accelerators support a special type of quirky mounting matrix found > in ACPI systems, but not a generic mounting matrix such as from the device > tree. > > Augment the ACPI hack to be a bit more generic and accept a mounting > matrix from device properties. > > This makes it possible to fix orientation on the Ux500 HREF device. ... > +static const struct iio_chan_spec_ext_info st_accel_mount_matrix_ext_info[] = { > + IIO_MOUNT_MATRIX(IIO_SHARED_BY_ALL, st_accel_get_mount_matrix), > + { }, Comma is not needed for terminator lines. > +}; ... > + /* First try ACPI orientation then try the generic function */ It's a bit confusing, because the generic also tries ACPI. Perhaps "...try specific ACPI methods to retrieve orientation, then..."? > + err = apply_acpi_orientation(indio_dev); > + if (err) { > + err = iio_read_mount_matrix(adata->dev, "mount-matrix", > + &adata->mount_matrix); > + if (err) > + goto st_accel_power_off; > + } -- With Best Regards, Andy Shevchenko