From nobody Mon Feb 9 22:19:18 2026 Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (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 41EF12BCF4A for ; Tue, 23 Dec 2025 02:55:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766458534; cv=none; b=Whj24cVf7cWaG/9ow9SrhUX9JNtHmIDc2oDxNCRulAGetTtJI/Rz1fhPza1eeUlk2dxvA7VYtWHaH0ELu00OsDiiw28LyX5I+X5dfjmk2FczhhAToktNLIab9nxdQAu3TfVZknS5vDwn3Nq1Ccn5zSZOWIoMjRNjl8R7UrWNSYQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766458534; c=relaxed/simple; bh=R/pyaDy3Q7zpGfMK7jtEmQplZlnmXe5j1vpWw+kfDUk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o6dW2gh0PZdL/r04aCXnrGMuKX2WpBR7uCyB6NQXTxtOVzTwfLqZeV83N29eoJ4qRq7yhwSvxyUUW1zrnUHRlxkmoLV14yujZEajbtZMeUKqsZ8mUkULOuGox6FlIEoIb+azAzsQBhIBA/4izrQL7Byh9MFULAzK4sMzY2ex6AI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dionne-riel.com; spf=pass smtp.mailfrom=dionne-riel.com; dkim=pass (2048-bit key) header.d=dionne-riel-com.20230601.gappssmtp.com header.i=@dionne-riel-com.20230601.gappssmtp.com header.b=b5UZXv97; arc=none smtp.client-ip=209.85.222.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dionne-riel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dionne-riel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dionne-riel-com.20230601.gappssmtp.com header.i=@dionne-riel-com.20230601.gappssmtp.com header.b="b5UZXv97" Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-8b602811a01so508557385a.2 for ; Mon, 22 Dec 2025 18:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dionne-riel-com.20230601.gappssmtp.com; s=20230601; t=1766458532; x=1767063332; 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; bh=4byC3Mn7IdIEYarlTV3BJ0tOgTi1ifeHJj4YTWnTDNM=; b=b5UZXv974ITY1VPlleMISySbVlroR4+dBogTFdyYjLxhZ/OZkrCiwTuNxSxhnmOUpv +tgr+AeEWf0fBw/2ySX2egES22Wva55vNiE7SkaM4e820VmUsq7y6QSytmjUX6L2yf03 MihrKFBf/frCDJMHJNT4W9HCjGyepCKmSNuBlc62MIUYglqeuQjvFyeYOo+Z1uvpXADC eTTecHZaVYmJrtVGusA9wXwJ6aDeVBr0QiMUQAteKUF0V1xqSg6kfexSInH9QqkEJ8Ex 9INSDRgbFP/1nYaDxjAXKE3f7D6nvs+8Ljd29rXT2A8ICixxs+2BYObNli5Aaqoh8hMW Dfeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766458532; x=1767063332; 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; bh=4byC3Mn7IdIEYarlTV3BJ0tOgTi1ifeHJj4YTWnTDNM=; b=dOBtcNsoz5nKrf6HZYnFzZDTdUgL3hEnid4TbW8KGdCGIaQWcCTYpGExuvdDnwNotq ZFkF7qZoZGpik2mI9J8crag75YWwnLO/dmhV/H34+Ux4lD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TJGguqeEdNjR/eFBcTx0vexKnYqw== X-Received: by 2002:a05:620a:4484:b0:8b2:ec00:784f with SMTP id af79cd13be357-8c08fbb9c47mr2108884385a.82.1766458532150; Mon, 22 Dec 2025 18:55:32 -0800 (PST) Received: from frankgrimes.elk-nominal.ts.net (135-23-195-66.cpe.pppoe.ca. [135.23.195.66]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8c0970f8572sm952775585a.25.2025.12.22.18.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Dec 2025 18:55:31 -0800 (PST) From: Samuel Dionne-Riel To: Lorenzo Bianconi , Jonathan Cameron , David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko Cc: Samuel Dionne-Riel , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] iio: imu: lsm6dsx: Add alternative ACPI mount matrix retrieval Date: Mon, 22 Dec 2025 21:53:51 -0500 Message-ID: <20251223025351.3099978-4-samuel@dionne-riel.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251223025351.3099978-2-samuel@dionne-riel.com> References: <20251223025351.3099978-2-samuel@dionne-riel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This uses the SLA0 matrix, which is how the SMOCF05 configuration exposes the mounting information for the accelerometer. On a limited sample size of one (1) unit, the SLG0 matrix is the identity matrix. It is unknown how the SLG0 mounting matrix would logically affect the data, if it differed from the identity matrix. After all, the IMU is mounted as one single unit, its mounting can't differ on the gyroscope compared to the accelerometer. Signed-off-by: Samuel Dionne-Riel --- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu= /st_lsm6dsx/st_lsm6dsx_core.c index 49ac17806e720..4bf1f7f7552d1 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c @@ -2707,6 +2707,12 @@ int st_lsm6dsx_probe(struct device *dev, int irq, in= t hw_id, return err; } =20 + if (!iio_read_acpi_mount_matrix(hw->dev, &hw->orientation, "SLA0")) { + err =3D iio_read_mount_matrix(hw->dev, &hw->orientation); + if (err) + return err; + } + for (i =3D 0; i < ST_LSM6DSX_ID_MAX; i++) { if (!hw->iio_devs[i]) continue; --=20 2.51.0