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 /include | |
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 'include')
-rw-r--r-- | include/linux/iio/magnetometer/ak8975.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/iio/magnetometer/ak8975.h b/include/linux/iio/magnetometer/ak8975.h new file mode 100644 index 0000000..c840095 --- /dev/null +++ b/include/linux/iio/magnetometer/ak8975.h @@ -0,0 +1,16 @@ +#ifndef __IIO_MAGNETOMETER_AK8975_H__ +#define __IIO_MAGNETOMETER_AK8975_H__ + +#include <linux/iio/iio.h> + +/** + * struct ak8975_platform_data - AK8975 magnetometer driver platform data + * @eoc_gpio: data ready event gpio + * @orientation: mounting matrix relative to main hardware + */ +struct ak8975_platform_data { + int eoc_gpio; + struct iio_mount_matrix orientation; +}; + +#endif |