From: Joshua Crofts <crofts@kernel.org>
To: hexin@hexin.host, linux-iio@vger.kernel.org,
Michael Hennerich <Michael.Hennerich@analog.com>,
Puranjay Mohan <puranjay@kernel.org>,
Marcelo Schmitt <marcelo.schmitt@analog.com>,
Antoniu Miclaus <antoniu.miclaus@analog.com>,
Ramona Gradinariu <ramona.gradinariu@analog.com>,
Petre Rodan <petre.rodan@subdimension.ro>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux@analog.com
Subject: Re: [PATCH v2 00/18] iio: accel: add mount matrix support to 18 accelerometer drivers
Date: Mon, 30 Nov 2026 12:34:24 +0100 [thread overview]
Message-ID: <3f846bd6-0fa6-48d4-8a58-31b85f25e2c7@kernel.org> (raw)
In-Reply-To: <20261130-work-v2-0-9eccecc71702@hexin.host>
On 30-Nov-26 7:29, He Xin via B4 Relay wrote:
> These drivers ignore the "mount-matrix" property that other accelerometer
> drivers already honour, so userspace gets raw sensor axes on any board
> whose sensor is not mounted axis-aligned with the display. A udev/hwdb
> override does not cover it either: it keys off the sensor modalias and
> DMI, which do not tell such boards apart.
>
> Each patch is mechanical and independent: store the matrix in the driver's
> private data, add an IIO_MOUNT_MATRIX() ext_info entry to the accelerometer
> channels, and read the property once in probe.
>
> One behaviour change: a board whose firmware describes a matrix with the
> wrong number of entries now fails to probe with -EINVAL instead of being
> ignored, which is what the drivers that already support the property do.
>
> Not converted here, because the change would not have the same shape:
> adis16201, adis16209 and sca3000 list their channels as array literals,
> adxl313_core and fxls8962af-core keep the probe in the bus wrappers, and
> mma9551/mma9553 differ in both. hid-sensor-accel-3d, ssp_accel_sensor and
> cros_ec_accel_legacy take the orientation from the HID/SSP/EC side rather
> than from a firmware property.
>
> Changes in v2:
> - move stk8ba50 to patch 1
> - place the mount matrix before the __aligned(IIO_DMA_MINALIGN) members in
> adxl345, adxl355, adxl367, adxl380, bma220, bmi088 and sca3300, so the
> DMA buffers keep their own cacheline
> - add the missing blank line after the mount matrix read in probe
> - add the @orientation kernel-doc entry for msa311 and sca3300
> - shorten the stk8ba50 test note to the behaviour observed on the device
> - v1 lost its threading because the sending MTA rewrote Message-IDs while
> leaving References untouched; v2 is posted as a new series
>
> Build tested with allmodconfig: drivers/iio/accel, 71 objects, no warnings;
> checkpatch.pl is silent in default and in --strict mode. Only stk8ba50 was
> tested on hardware; the other 17 are compile tested.
>
> Link: https://lore.kernel.org/linux-iio/5F08289E852625FC+20261127030810.3150676-1-hexin@hexin.host/
> Signed-off-by: He Xin <hexin@hexin.host>
> ---
I haven't checked the placements in the data structs with pahole, but otherwise
this LGTM.
For the series,
Reviewed-by: Joshua Crofts <crofts@kernel.org>
--
Kind regards,
Joshua Crofts
prev parent reply other threads:[~2026-11-30 11:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 6:29 [PATCH v2 00/18] iio: accel: add mount matrix support to 18 accelerometer drivers He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 01/18] iio: accel: stk8ba50: support mount matrix He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 02/18] iio: accel: adxl345_core: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 03/18] iio: accel: adxl355_core: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 04/18] iio: accel: adxl367: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 05/18] iio: accel: adxl372: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 06/18] iio: accel: adxl380: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 07/18] iio: accel: bma220_core: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 08/18] iio: accel: bmi088-accel-core: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 09/18] iio: accel: da280: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 10/18] iio: accel: da311: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 11/18] iio: accel: dmard06: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 12/18] iio: accel: dmard09: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 13/18] iio: accel: dmard10: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 14/18] iio: accel: mma7455_core: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 15/18] iio: accel: msa311: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 16/18] iio: accel: mxc6255: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 17/18] iio: accel: sca3300: " He Xin via B4 Relay
2026-11-30 6:29 ` [PATCH v2 18/18] iio: accel: stk8312: " He Xin via B4 Relay
2026-11-30 11:34 ` Joshua Crofts [this message]
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=3f846bd6-0fa6-48d4-8a58-31b85f25e2c7@kernel.org \
--to=crofts@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=dlechner@baylibre.com \
--cc=hexin@hexin.host \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux@analog.com \
--cc=marcelo.schmitt@analog.com \
--cc=nuno.sa@analog.com \
--cc=petre.rodan@subdimension.ro \
--cc=puranjay@kernel.org \
--cc=ramona.gradinariu@analog.com \
/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