Revert "Revert "iio: imu: nvi: v.337 Fix DMP gyro""
Robert Collins [Mon, 28 Nov 2016 17:47:13 +0000 (09:47 -0800)]
This reverts commit 79d3a1160b94d4b8f83ad5e643c5b6f4cc6b0ce7.

This patch restores the following commit:
    iio: imu: nvi: v.337 Fix DMP gyro

    - Fix ICM DMP gyroscope data output to match the standard FIFO data output.

    Bug 1831500

Bug 200246901
Bug 1831500

Change-Id: Id33e9b4024a6455f65503c6de18b7dbdae76652e
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1263653
GVS: Gerrit_Virtual_Submit
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-by: Spencer Sutterlin <ssutterlin@nvidia.com>
Tested-by: Spencer Sutterlin <ssutterlin@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,