From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 652CD491596 for ; Mon, 28 Sep 2026 21:07:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790629635; cv=none; b=SP7EqznwTEdR8Wg3AmTEp6u0frfs0nHZdrRJFu+/y2ieMk8K0ivgpovsyfbKqVWKowD3niNemIx2ncZadKr6QXjmE2UF5R2IGcQebgwADgU+R1fhiPhWH+i449GhclYpR7Iwte9CBhXUlEB/TyWxPaJyizMPdB4gy3BpIg01glk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790629635; c=relaxed/simple; bh=hU+IxLlZZOcgwJxZMzz1xAayi/JKKfOUSMnkoxiKwyQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WNFl1IgiWbnpLrgEw1NhpmwD0kKVjP++6v1PHiz7+T47cx+uML9H2hgUnPm7jJQV1Olmq6W6wZyOOPpkvHDMK7ZqjFJHiCWLEVj9+EH8AdzJbmBxvHqBhrOJ0USaBlGbp0g6cswGdnJAXfh+Yqy0I2bAPZkEr4Nqw4avbdmW/kU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Kp7k7aFF; arc=none smtp.client-ip=209.85.222.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Kp7k7aFF" Received: by mail-qk1-f170.google.com with SMTP id af79cd13be357-93c5b7f5bfaso23395485a.1 for ; Mon, 28 Sep 2026 14:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790629633; x=1791234433; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ZfUcyDo8bj/+3e29tf/qBMWppSLDCnumnXvFC6mLqnM=; b=Kp7k7aFFzkgiUjtA0VFVP4VFwvepTvhEE0jvEN6wDff7Ebw0ZXmQ4jIcOHBCuJsX7r r2LeFeFA48zsSjMkUMSZE2yAVDdbbUxkzjX0NNZD8bVe0TPW9P6yBUzDrcEW8JgLinp8 7VGSr15McUtNWmeGsmboAr7j3SCRTb19pNyKbw/iGna1jWb9dEtWM3tIOEI0FpkDE14J CTZx+COSwxRBdflkUykiunG27MY2vxNV+nETy4g341XqnynQfZOxSm4uSFvn7wqk3VdM tK8vqGTn4YQ/p7YtAppA7FLkJnLTE21QoHMrtK3N5B1chQsjIBoV5xFYg1W/gOf6KwiU r5nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790629633; x=1791234433; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=ZfUcyDo8bj/+3e29tf/qBMWppSLDCnumnXvFC6mLqnM=; b=CINETOwDJtmMOAlQzeBqppSynXxbf3JrGPYkEXiNO0Oai9vg7oxx4AKAMFNYCeka4z aWn3SF4ooa/KrfiT6+dy2m5rNPnaVZSb69hrDk66Iicae8h3TmhT6d1Gm6pKev1LVifp tJV6j+nm0uK/ThvTBjw8JIo9fiJGrFjRbMFJszt07/jtrvtrqWtZ+OE5pVYi1dZB68zm cmLZxv5JDkX4gsOrKj4G45L676KZ/PlV2vhlPUb47a0X8rH84Hfry1HPopo0LtXhe7ff 5MOPDCD5bOkXz9FpAs0VQqBo8ansIx4YBukdykMxlCsKgfdRFe3eTMmYw6aDkQtacX3h o1Ag== X-Forwarded-Encrypted: i=1; AKwUvByPRJoUAXrT8jm5sDIdWO/THrmoRbwij0qEWTSKn4kH65Cs+9qHE303eriEoJ4VbTiw3hX8aee0qoiGYLI=@vger.kernel.org X-Gm-Message-State: AFuF++mfN8BgH+JMlYungggs3EtNvHZGwlpa+4XbRRlblO4LQK9Mzs8f SQbU2BqRNSZ/zUIt+8oEExMpqQ0YjiEINHZkgAhi9y9CD+lQqQT9/e4i X-Gm-Gg: AYBFou13iTdw5LT+y7pATu9pJ81jqpmrfWuSWztcerjN8xQh3TI8yEX3eMHZMChNYGy BXu53d5z9c8+ilsA0OVY4bnF2lyDDib9DmK9H7H2UEbSPek87xRRWW7JBnA2Ida04ZYbhVUH+Ua AB9VcG1wyqTV/QSjLvLdmoSv+rZjqPow8a1LD0DBmMn/XJvMzNgARxSqIUY84rm8G3Hgd07VMPV BBCzwCzTJY9rfyS6Y8QUtN6gKPGknGgaCSfFRdwHc0fBYQVAYapgHmCBNo1byGxXvxJmGK/GdfD nf6jDzEPyo8/mVAuNY6PpBzJGlD7Y25CsUv1GqvxwHjS2X7A4m2as5xewkLxyTxmo70UrVqrJT5 BrrNPxUi34+BULMhx1hRx+7lcBbiV4JAU+Owht9i2SNTiKeJqaFY52KPd+Z+hP5WLGNQj00Yl1s UQVGeIcqCN80Y0VbfwsmzPEvBJk5fBsJ7OTGN/Qw3Pm/lUXrtjd2X6scjFBGRgXpzKmo5xNOxvY m2TMjPU6/HozrShE4UCQ5nvKcGAfcSAhiS5OL+Jf04ahyx8ZnvmB/Zuln8ialS4HFWMRCY9rUWB 18yjMWw= X-Received: by 2002:a05:620a:6f02:b0:93c:7861:675 with SMTP id af79cd13be357-93c8bcd071amr126916185a.1.1790629633106; Mon, 28 Sep 2026 14:07:13 -0700 (PDT) Received: from cachyos-SlimIce.lan (1841343-static.dvnpiaaa.metronetinc.net. [195.252.229.229]) by smtp.gmail.com with ESMTPSA id af79cd13be357-93c814342f9sm241348885a.29.2026.09.28.14.07.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2026 14:07:12 -0700 (PDT) From: Jared Wuerzburger To: Jonathan Cameron , Lorenzo Bianconi Cc: Andy Shevchenko , David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko , Samuel Dionne-Riel , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/2] iio: imu: st_lsm6dsx: Add ACPI ID SMOCF05 for LSM6DS3TR-C Date: Mon, 28 Sep 2026 16:06:48 -0500 Message-ID: <20260928210648.17166-3-jwuerz@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260928210648.17166-1-jwuerz@gmail.com> References: <20260928210648.17166-1-jwuerz@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Samuel Dionne-Riel 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 [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 Signed-off-by: Jared Wuerzburger --- 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. 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); -- 2.55.0