public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Jonathan Cameron <jic23@kernel.org>,
	linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Denis Ciocca <denis.ciocca@st.com>,
	Daniel Drake <drake@endlessm.com>,
	Stephan Gerhold <stephan@gerhold.net>
Subject: Re: [PATCH 2/5 v2] iio: accel: st_sensors: Support generic mounting matrix
Date: Tue, 18 May 2021 14:03:39 +0300	[thread overview]
Message-ID: <YKOfCyuPOeomUbG1@smile.fi.intel.com> (raw)
In-Reply-To: <20210517233322.383043-2-linus.walleij@linaro.org>

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



  reply	other threads:[~2021-05-18 11:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 23:33 [PATCH 1/5 v2] iio: st_sensors: Create extended attr macro Linus Walleij
2021-05-17 23:33 ` [PATCH 2/5 v2] iio: accel: st_sensors: Support generic mounting matrix Linus Walleij
2021-05-18 11:03   ` Andy Shevchenko [this message]
2021-05-17 23:33 ` [PATCH 3/5 v2] iio: accel: st_sensors: Stop copying channels Linus Walleij
2021-05-17 23:33 ` [PATCH 4/5 v2] iio: magnetometer: st_magn: Support mount matrix Linus Walleij
2021-05-18  9:01   ` Stephan Gerhold
2021-05-18 18:09     ` Jonathan Cameron
2021-05-18 11:05   ` Andy Shevchenko
2021-05-17 23:33 ` [PATCH 5/5 v2] iio: gyro: st_gyro: " Linus Walleij
2021-05-18 11:06   ` Andy Shevchenko
2021-05-18 18:06   ` Jonathan Cameron
2021-05-18  9:04 ` [PATCH 1/5 v2] iio: st_sensors: Create extended attr macro Andy Shevchenko
2021-05-18 11:07 ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YKOfCyuPOeomUbG1@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=denis.ciocca@st.com \
    --cc=drake@endlessm.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=stephan@gerhold.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox