aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorGregor Boirie <gregor.boirie@parrot.com>2016-04-20 13:23:44 -0400
committerJonathan Cameron <jic23@kernel.org>2016-04-23 17:14:34 -0400
commit97eacb9166f4810368e180073dcbceeff0de34df (patch)
tree6acfa9d79d34ba1d141a9e73b8f94bec42c183b2 /include/linux
parentdfc57732ad38f93ae6232a3b4e64fd077383a0f1 (diff)
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/linux')
-rw-r--r--include/linux/iio/magnetometer/ak8975.h16
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 000000000000..c8400959d197
--- /dev/null
+++ b/include/linux/iio/magnetometer/ak8975.h
@@ -0,0 +1,16 @@
1#ifndef __IIO_MAGNETOMETER_AK8975_H__
2#define __IIO_MAGNETOMETER_AK8975_H__
3
4#include <linux/iio/iio.h>
5
6/**
7 * struct ak8975_platform_data - AK8975 magnetometer driver platform data
8 * @eoc_gpio: data ready event gpio
9 * @orientation: mounting matrix relative to main hardware
10 */
11struct ak8975_platform_data {
12 int eoc_gpio;
13 struct iio_mount_matrix orientation;
14};
15
16#endif