Merge commit 'main-jb-2012.08.03-B4' into t114-0806
[linux-2.6.git] / drivers / misc / inv_mpu / mpu6050 / mldl_cfg.c
index 22af0c2..920f4ae 100644 (file)
@@ -1786,6 +1786,16 @@ int inv_mpu_suspend(struct mldl_cfg *mldl_cfg,
                        return result;
                }
        }
+       /* Disable irq when suspend all sensors */
+       if (sensors == INV_ALL_SENSORS) {
+               result = inv_serial_single_write(
+                       gyro_handle, mldl_cfg->mpu_chip_info->addr,
+                       MPUREG_INT_ENABLE, 0);
+               if (result) {
+                       LOG_RESULT_LOCATION(result);
+                       return result;
+               }
+       }
        mldl_cfg->inv_mpu_cfg->requested_sensors = (~sensors) & INV_ALL_SENSORS;
 
        return result;