iio: imu: nvi: v.337 Fix DMP gyro
Erik Lilliebjerg [Tue, 1 Nov 2016 15:54:52 +0000 (08:54 -0700)]
- Fix ICM DMP gyroscope data output to match the standard FIFO data output.

Bug 1831500

Change-Id: Ie26071fe211c390a03d4f912815ed00a89beff8b
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1245846
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Collins <rcollins@nvidia.com>

drivers/iio/imu/nvi_mpu/nvi.c
drivers/iio/imu/nvi_mpu/nvi_dmp_icm.c

index 7a4aad0..62fa901 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "nvi.h"
 
-#define NVI_DRIVER_VERSION             (336)
+#define NVI_DRIVER_VERSION             (337)
 #define NVI_VENDOR                     "Invensense"
 #define NVI_NAME                       "mpu6xxx"
 #define NVI_NAME_MPU6050               "mpu6050"
index 75f730a..a76a791 100644 (file)
@@ -486,6 +486,7 @@ static struct nvi_dmp_dev nvi_dmp_devs[] = {
        {
                .dev                    = DEV_GYR,
                .buf_n                  = 12,
+               .buf_shft               = -15,
                .int_ctl                = GYRO_CALIBR_SET,
                .odr_cfg                = ODR_GYRO_CALIBR,
                .odr_cntr               = ODR_CNTR_GYRO_CALIBR,