]> git.baikalelectronics.ru Git - kernel.git/commit
iio:core: mounting matrix support
authorGregor Boirie <gregor.boirie@parrot.com>
Wed, 20 Apr 2016 17:23:43 +0000 (19:23 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sat, 23 Apr 2016 21:13:05 +0000 (22:13 +0100)
commit41a6f216a91dd4364c5bdba739e2a075e3b0a66d
tree180c004346687cc3d6204239a25bc630c30ea569
parent65e0f2f5d22e2f5569be2837c1ac2cf9e6c0f7f5
iio:core: mounting matrix support

Expose a rotation matrix to indicate userspace the chip placement with
respect to the overall hardware system. This is needed to adjust
coordinates sampled from a sensor chip when its position deviates from the
main hardware system.

Final coordinates computation is delegated to userspace since:
* computation may involve floating point arithmetics ;
* it allows an application to combine adjustments with arbitrary
  transformations.

This 3 dimentional space rotation matrix is expressed as 3x3 array of
strings to support floating point numbers. It may be retrieved from a
"[<dir>_][<type>_]mount_matrix" sysfs attribute file. It is declared into a
device / driver specific DTS property or platform data.

Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Documentation/ABI/testing/sysfs-bus-iio
drivers/iio/industrialio-core.c
include/linux/iio/iio.h