From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo2-f41.google.com (mail-oo2-f41.google.com [74.125.231.169]) (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 682024DD3D1 for ; Mon, 28 Sep 2026 17:52:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.231.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790617934; cv=none; b=MWmpwenJzmDEFWboaaZHwg4tK0pGuu4yavEhDzRxjJYHeNY0dQ68DB9MIpVF2UqZ5UTVowfVuzi+zpUkFkg8WEMrIqOwqqElZOI/jJWXuh7Ejog3zVyPZCfVdH0IGusvxxz4JTzNKh7GldlyGi7GUJ2QRC3J/qX+nP93Y1X0yKs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790617934; c=relaxed/simple; bh=aX7D9fe6wgqI+yh1tRxKCLwwJ3l80BYRwaXfGv/OprE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p8LSR6yONKkKQmncCKH/hi6a0qpw2ieaEC1WfRjr6Qd8pt5WCtS1gcEanOxfI7sD2dJNp7kJWJ8czNlqx2J2djQbbyH1Oel1EcpiUq9ZUaC4bRuWcpv0Fh2Sbe8Vx/rRgYt2yxkm2dV2VTr0ayTyK8+3Aoef5F2Enx2sQI/WKoE= 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=PUZLsK3p; arc=none smtp.client-ip=74.125.231.169 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="PUZLsK3p" Received: by mail-oo2-f41.google.com with SMTP id 006d021491bc7-6d33d80855eso2324683eaf.1 for ; Mon, 28 Sep 2026 10:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790617931; x=1791222731; 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=gSUc6iIFEktt4xs/8drR7GEw7uAyN5LVYmIaYzfxAoc=; b=PUZLsK3pV3Y0qml4ftKHUv5bc5ploACHOynkvT7fa+QVlTX8NTqElZYi/qfvnQPWrO 6Vy7T98qYwTAk7ergQvGGR6+c0HedKF4l3WscJ4gAB0vxvlBV59XQ1bJFKAM+sBlBO/v r+FTG1OiazcL0tFqTCRg0OV8+w+t3ZA5Gep09vrMZ/EV8CO1rXSz7oZQmz9Rmb7iBZjc qVkjocb2ZmJzT830rw2O7ug4csXu3JjR66e0Gy/5ZA1nUJvbYa5L6jOa5fcO7EJriKN4 Rtg3R4fT72lWGfDo+9VphAi40/ZTrd8t41x6+MD0FuXv1rQZ7zT6TykarMlq+NHFPNnO USWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790617931; x=1791222731; 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=gSUc6iIFEktt4xs/8drR7GEw7uAyN5LVYmIaYzfxAoc=; b=esnI6uXosukRqcuWr6f1uPgoE5s1LWS+//8svAvWJu8Ep6EGqGHvsuMfX7duA6DCuG e7azcL6f03VG5N6sziUpaFAcs1oKNc+s1+k5Gdws5ALbJKTrr362IuszcJ/z5FVbbLKp kYDMKhKIUesS1iYqoYKHG7y7IhS5Vp61/w+ishb5/V/MC/e7lEee/41mkwTXDj4th7Fe dvkQFcq2KcFLVYxWeprW1FafeSJKjhsqy8dn71CYkG6l5ABpH0ifUjYDe+fVISosh4Vu nWY9SY/92PtuIEY8Z49FJZdAHtH7B4vaS4nc45RPk5SzwMa2P6fV2wNwzklZ8JF/06Hz 3JTA== X-Forwarded-Encrypted: i=1; AKwUvBywVnbw8jd/1wEHccnV+Yk6iZ7ZB14yhRSnR8QzwtBnAI17Nn5W7INRM+4vbL8aVEOqbezChILrYyBTe6A=@vger.kernel.org X-Gm-Message-State: AFuF++lBZfJOKd/tpL2RKlJXCPWLzy76mj1mP8UpnpNfwG7fDDh9LFgc 7PZZ5e7SlabiVmtcAjPi9bugDXFQ5JAIZOB14qkV5EJEiPVVk6wkhF2z X-Gm-Gg: AYBFou15/fqzsnXnG2XQZpuXvWls15mwRAxa5vagoBamsfdLM6LRHDGCc8sa7kwpC+3 zOQoTUDTxnBuGDgcYgyCqVy75YJQlyZ1+qR7qQXf39fT1Pn8p0PqfyRBd3ZpwrEIGxAZCvRVL+x N79/28iDquP3sPtopEd1AodZw/A/EWZOOv32ETS2ZDdmqiO/AcZEey55SmV6+pVDwCWyLPNBk2d Rblc5RJq5SCn2I9uUFSy4g4p5L7wOWTrfWBlRiynOMKKn2z52Ydrixr9J6aBrw8igInw6qr89qi uo6Q6XdTMOHZjagqhv4JzP9umf+uwoVOjUxI6DHJ+uyPqKyfcNb/BoLx9VpQJmaQ3NZJp6qx3n3 UBjp0blI8VPgH+0u63eoHG06JUlhEjCpZa5GYS/6EwcqnhAST6dqZiH58XXWb1QfRnL0HyjimOk vBhdRKN+W80TywrVWk+63tZUsi3kJu5Was07Gu0iJJoe7o3sWip/htCUvSKktWvJzqQN4DS1iy5 2svr6TPUlic3qxdy2Z8tw== X-Received: by 2002:a4a:e913:0:b0:6d8:9568:840a with SMTP id 006d021491bc7-6d89568880bmr3942870eaf.46.1790617930923; Mon, 28 Sep 2026 10:52:10 -0700 (PDT) Received: from cachyos-SlimIce.lan ([2607:fb90:9a26:9349::e71]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-6d8822199cbsm5971644eaf.5.2026.09.28.10.52.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2026 10:52:10 -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 v4 2/2] iio: imu: st_lsm6dsx: Add ACPI ID SMOCF05 for LSM6DS3TR-C Date: Mon, 28 Sep 2026 12:50:49 -0500 Message-ID: <20260928175049.86941-3-jwuerz@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260928175049.86941-1-jwuerz@gmail.com> References: <20260928175049.86941-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. Relevant part of the DSDT, identical on both models: Scope (_SB.I2CD) { Device (STS) { Name (_HID, EisaId ("SMOCF05")) Name (_CID, EisaId ("SMOCF05")) _CRS: I2cSerialBusV2 (0x006A, ..., "\\_SB.I2CD") vendor data "SLA0" I2cSerialBusV2 (0x006A, ..., "\\_SB.I2CD") vendor data "SLG0" GpioInt (Edge, ActiveHigh, ..., "\\_SB.GPIO") { 9 } "SLA0" Method (SLA0): "-1 0 0", "0 -1 0", "0 0 -1" Method (SLG0): "1 0 0", "0 1 0", "0 0 1" } } Both I2C resources describe the same address; the I2C core uses the first one. The vendor-specific SLA0/SLG0 methods 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 the DSDT excerpt, test results and mount matrix rationale, converted the entry to C99 initializers, dropped the mount matrix patch] Assisted-by: LLM Signed-off-by: Jared Wuerzburger --- Notes: Jonathan, when applying, could you add a Link: to this series? The cover letter has the full DSDT excerpt, too long for the changelog. 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