dt-bindings: iio: imu: st,lsm6dsx: add mount-matrix property
Subsystems (3)
PATCH 1/1 dt-bindings: iio: imu: st,lsm6dsx: add mount-matrix property
Add the mount-matrix optional property to the binding since it's supported and very useful when using the chip on a board.
--- Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml +6 -0
@@ -93,6 +93,9 @@ properties: wakeup-source: $ref: /schemas/types.yaml#/definitions/flag + mount-matrix: + description: an optional 3x3 mounting rotation matrix + required: - compatible - reg
@@ -114,6 +117,9 @@ examples: reg = <0x6b>; interrupt-parent = <&gpio0>; interrupts = <0 IRQ_TYPE_EDGE_RISING>; + mount-matrix = "1", "0", "0", + "0", "1", "0", + "0", "0", "-1"; }; }; ...
Signature · 1 line
2.30.2
Jonathan Cameron
maintainerQuoted 4 lines · On Fri, 21 Jul 2023 10:34:10 +0000 Martin Kepplinger <[email protected]> wrote:
Add the mount-matrix optional property to the binding since it's supported and very useful when using the chip on a board.
Signed-off-by Martin Kepplinger <[email protected]>
Hi Martin,
A question on the example.
Quoted 19 lines
--- Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 6 ++++++ 1 file changed, 6 insertions(+)Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml +3
-0@@ -93,6 +93,9 @@ properties: wakeup-source: $ref: /schemas/types.yaml#/definitions/flag + mount-matrix: + description: an optional 3x3 mounting rotation matrix + required: - compatible - reg
Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml examples: · line 122
Quoted 6 lines
Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml +3
-0@@ -114,6 +117,9 @@ examples: reg = <0x6b>; interrupt-parent = <&gpio0>; interrupts = <0 IRQ_TYPE_EDGE_RISING>; + mount-matrix = "1", "0", "0", + "0", "1", "0", + "0", "0", "-1";
That's not a rotation matrix - so it's not a valid example... IIRC it's a rotoinversion (determinant -1 whereas should be 1 for a rotation matrix)
If a device is doing this we have a disagreement wrt to whether it is using a left or right handed axis - which is a problem, though one that is tricky to fix without causing people all sorts of problems..
Jonathan
Quoted 3 lines
Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml +0
-0}; };