diff options
author | Gregor Boirie <gregor.boirie@parrot.com> | 2016-04-20 17:23:44 (GMT) |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-04-23 21:14:34 (GMT) |
commit | 97eacb9166f4810368e180073dcbceeff0de34df (patch) | |
tree | 6acfa9d79d34ba1d141a9e73b8f94bec42c183b2 /Documentation/devicetree/bindings/iio | |
parent | dfc57732ad38f93ae6232a3b4e64fd077383a0f1 (diff) | |
download | linux-97eacb9166f4810368e180073dcbceeff0de34df.tar.xz |
iio:ak8975: add mounting matrix support
Expose a rotation matrix to indicate userspace the chip orientation with
respect to the overall hardware system.
Matrix is retrieved from "in_mount_matrix". It is declared into ak8975 DTS
entry as a "mount-matrix" property.
Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'Documentation/devicetree/bindings/iio')
-rw-r--r-- | Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt index 34a3206..e1e7dd32 100644 --- a/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt +++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt @@ -9,6 +9,7 @@ Optional properties: - gpios : should be device tree identifier of the magnetometer DRDY pin - vdd-supply: an optional regulator that needs to be on to provide VDD + - mount-matrix: an optional 3x3 mounting rotation matrix Example: @@ -17,4 +18,13 @@ ak8975@0c { reg = <0x0c>; gpios = <&gpj0 7 0>; vdd-supply = <&ldo_3v3_gnss>; + mount-matrix = "-0.984807753012208", /* x0 */ + "0", /* y0 */ + "-0.173648177666930", /* z0 */ + "0", /* x1 */ + "-1", /* y1 */ + "0", /* z1 */ + "-0.173648177666930", /* x2 */ + "0", /* y2 */ + "0.984807753012208"; /* z2 */ }; |