]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
dt-bindings: iio: gyroscope: add mount-matrix for bmg160
authorVishwas Rajashekar <vishwas.dev@vrajashkr.com>
Fri, 17 Apr 2026 18:41:09 +0000 (00:11 +0530)
committerJonathan Cameron <jic23@kernel.org>
Sun, 31 May 2026 09:59:31 +0000 (10:59 +0100)
The mount-matrix property supplies a 3x3 matrix that is used
to transform the values from the gyroscope to get vector
values that are relative to the way the sensor has been mounted
on the device. When the property is not specified, the identity
matrix is used.

This change adds mount-matrix as an optional property to the
dt-bindings for the bmg160 gyroscope.

Signed-off-by: Vishwas Rajashekar <vishwas.dev@vrajashkr.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml

index fcbd4b430e48ea3e6ee09bf6bc3750d73271dc1e..8e094651381c846e53b9ca43216456fce3bf5e83 100644 (file)
@@ -26,6 +26,9 @@ properties:
   vdd-supply: true
   vddio-supply: true
 
+  mount-matrix:
+    description: an optional 3x3 mounting rotation matrix.
+
   spi-max-frequency:
     maximum: 10000000
 
@@ -56,6 +59,9 @@ examples:
             reg = <0x69>;
             interrupt-parent = <&gpio6>;
             interrupts = <18 IRQ_TYPE_EDGE_RISING>;
+            mount-matrix = "0", "1", "0",
+                           "1", "0", "0",
+                           "0", "0", "1";
         };
     };
 ...