Re: [PATCH 2/5 v2] iio: accel: st_sensors: Support generic mounting matrix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux