mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Jared Wuerzburger <jwuerz@gmail.com>
Cc: "Lorenzo Bianconi" <lorenzo@kernel.org>,
	"Andy Shevchenko" <andriy.shevchenko@intel.com>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Samuel Dionne-Riel" <samuel@dionne-riel.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/2] iio: imu: st_lsm6dsx: Add ACPI ID SMOCF05 for LSM6DS3TR-C
Date: Mon, 19 Oct 2026 03:07:25 +0100	[thread overview]
Message-ID: <20261019030725.72670a4f@jic23-hlaptop> (raw)
In-Reply-To: <20260928210648.17166-3-jwuerz@gmail.com>

On Mon, 28 Sep 2026 16:06:48 -0500
Jared Wuerzburger <jwuerz@gmail.com> wrote:

> From: Samuel Dionne-Riel <samuel@dionne-riel.com>
> 
> The Minisforum V3 and V3 SE tablets declare their ST LSM6DS3TR-C IMU in
> the DSDT with the hardware ID SMOCF05 instead of SMO8B30, so the driver
> never binds and the accelerometer and gyroscope are missing. The
> Windows driver (version 1.0.4.3) binds the LSM6DS3TR-C to both IDs.
> 
> The device has two I2C resources for the same address; the I2C core
> uses the first one.
> 
> The vendor-specific SLA0/SLG0 matrix methods in the DSDT are not parsed,
> because SLA0 is not usable as a mount matrix as it is. Its X and Y signs
> are right, but it also negates Z. It follows the Windows sensor
> convention, which reports Z = -1g with the screen facing up, while
> iio-sensor-proxy uses the same X and Y signs but expects Z = +1g in that
> posture. Applied as a mount matrix, SLA0 gives correct screen rotation,
> but iio-sensor-proxy reports the tilt inverted. The actual mounting is a
> plain 180 degree rotation about Z (-1 0 0; 0 -1 0; 0 0 1), with which
> orientation and tilt are both right. As for SMOCF00, the matrix is
> therefore provided by the systemd hwdb instead.
> 
> Tested on:
>  - V3 SE (Ryzen 7 7735U, BIOS 1.03) with this change.
>  - V3 (Ryzen 7 8840U, BIOS 1.06), kernel 7.2.7, with this change and
>    the stock firmware tables. The driver binds to i2c-SMOCF05:00, the
>    WHO_AM_I check passes (0x6a), and both lsm6ds3tr-c_accel and
>    lsm6ds3tr-c_gyro are registered. Screen auto-rotation and tilt work
>    with iio-sensor-proxy and the matrix above (checked with the device
>    renamed to SMO8B30 via a DSDT override, i.e. the same
>    ST_LSM6DS3TRC_ID driver data).
> 
> Closes: https://github.com/mudkipme/awesome-minisforum-v3/issues/2
> Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
> [Jared Wuerzburger: rewrote the changelog with test results and the
>  mount matrix rationale, converted the entry to C99 initializers,
>  dropped the mount matrix patch]
> Assisted-by: LLM
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> Signed-off-by: Jared Wuerzburger <jwuerz@gmail.com>
> ---
> 
> Notes:
>     Jonathan, the full DSDT excerpt is in the cover letter; a Link: to the
>     series (or b4 shazam -M) would keep it reachable from the commit.

Ah. I was working backwards in time today and applied a patch equivalent
to your patch 1 from someone else.  So just this one applied on top
of that.

Sorry about that!  I tend to work backwards when I'm way behind as
a lot of older threads have already resolved themselves :)

Thanks,

Jonathan

> 
>  drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c
> index c4097ce2bf..11e5ec3798 100644
> --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c
> +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c
> @@ -145,6 +145,7 @@ MODULE_DEVICE_TABLE(of, st_lsm6dsx_i2c_of_match);
>  static const struct acpi_device_id st_lsm6dsx_i2c_acpi_match[] = {
>  	{ .id = "SMO8B30", .driver_data = ST_LSM6DS3TRC_ID },
>  	{ .id = "SMOCF00", .driver_data = ST_LSM6DSO_ID },
> +	{ .id = "SMOCF05", .driver_data = ST_LSM6DS3TRC_ID },
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(acpi, st_lsm6dsx_i2c_acpi_match);


      reply	other threads:[~2026-10-19  2:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 21:06 [PATCH v5 0/2] iio: imu: st_lsm6dsx: Add ACPI ID SMOCF05 (Minisforum V3 / V3 SE) Jared Wuerzburger
2026-09-28 21:06 ` [PATCH v5 1/2] iio: imu: st_lsm6dsx: Use C99 initializers in ACPI match table Jared Wuerzburger
2026-09-28 21:06 ` [PATCH v5 2/2] iio: imu: st_lsm6dsx: Add ACPI ID SMOCF05 for LSM6DS3TR-C Jared Wuerzburger
2026-10-19  2:07   ` Jonathan Cameron [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=20261019030725.72670a4f@jic23-hlaptop \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jwuerz@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=samuel@dionne-riel.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

all inboxes | Powered by JetHome®