aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorGregor Boirie <gregor.boirie@parrot.com>2016-04-20 13:23:45 -0400
committerJonathan Cameron <jic23@kernel.org>2016-04-23 17:16:01 -0400
commiteb3798463f71afc77abd25b2f62708be06f7173b (patch)
treed35a30863782850b30e888b9cbc5822386beee1f /include/linux/platform_data
parent97eacb9166f4810368e180073dcbceeff0de34df (diff)
iio:imu:mpu6050: enhance mounting matrix support
Add a new rotation matrix sysfs attribute compliant with IIO core mounting matrix API. Matrix is retrieved from "in_anglvel_mount_matrix" and "in_accel_mount_matrix" sysfs attributes. It is declared into mpu6050 DTS entry as a "mount-matrix" property. Old interface is kept for backward userspace compatibility and may be retrieved from legacy platform_data mechanism only. 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/platform_data')
-rw-r--r--include/linux/platform_data/invensense_mpu6050.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/platform_data/invensense_mpu6050.h b/include/linux/platform_data/invensense_mpu6050.h
index ad3aa7b95f35..554b59801aa8 100644
--- a/include/linux/platform_data/invensense_mpu6050.h
+++ b/include/linux/platform_data/invensense_mpu6050.h
@@ -16,13 +16,16 @@
16 16
17/** 17/**
18 * struct inv_mpu6050_platform_data - Platform data for the mpu driver 18 * struct inv_mpu6050_platform_data - Platform data for the mpu driver
19 * @orientation: Orientation matrix of the chip 19 * @orientation: Orientation matrix of the chip (deprecated in favor of
20 * mounting matrix retrieved from device-tree)
20 * 21 *
21 * Contains platform specific information on how to configure the MPU6050 to 22 * Contains platform specific information on how to configure the MPU6050 to
22 * work on this platform. The orientation matricies are 3x3 rotation matricies 23 * work on this platform. The orientation matricies are 3x3 rotation matricies
23 * that are applied to the data to rotate from the mounting orientation to the 24 * that are applied to the data to rotate from the mounting orientation to the
24 * platform orientation. The values must be one of 0, 1, or -1 and each row and 25 * platform orientation. The values must be one of 0, 1, or -1 and each row and
25 * column should have exactly 1 non-zero value. 26 * column should have exactly 1 non-zero value.
27 *
28 * Deprecated in favor of mounting matrix retrieved from device-tree.
26 */ 29 */
27struct inv_mpu6050_platform_data { 30struct inv_mpu6050_platform_data {
28 __s8 orientation[9]; 31 __s8 orientation[9];