summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorJordan Nien <jnien@nvidia.com>2014-05-22 16:58:13 +0800
committerMandar Padmawar <mpadmawar@nvidia.com>2014-05-28 05:13:36 -0700
commitf5c564ef8c49204773ab4a704db475affab9e93c (patch)
treefabcf29522e030eb31d32897a5fa62c1c4e19846 /drivers/input
parentb58cfec7ffbbce22326c3ba3e2233ab9d32bf78c (diff)
input: misc: inv: Fix incorrect polling rate.
- fix incorrect settings for compass. Bug 1512000 Change-Id: I6691ca9e81f0781c20d63648a0e613f504fe75a2 Signed-off-by: Jordan Nien <jnien@nvidia.com> Reviewed-on: http://git-master/r/413085 (cherry picked from commit 07203ba5d23fc152c4fcd1b8924807df9b83bad5) Reviewed-on: http://git-master/r/415276 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Tony Hsiao <thsiao@nvidia.com> Reviewed-by: Mitch Luban <mluban@nvidia.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/mpu/inv_gyro.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/misc/mpu/inv_gyro.c b/drivers/input/misc/mpu/inv_gyro.c
index 01f6c6085aee..0711dec079b9 100644
--- a/drivers/input/misc/mpu/inv_gyro.c
+++ b/drivers/input/misc/mpu/inv_gyro.c
@@ -1235,7 +1235,8 @@ static int nvi_aux_delay(struct inv_gyro_state_s *inf,
/* HW global delay */
delay_new *= 1000;
delay_new /= inf->sample_delay_us;
- delay_new++;
+ if (delay_new)
+ delay_new--;
inf->aux.delay_hw = (u8)delay_new;
nvi_i2c_slv4_ctrl_wr(inf, (bool)(inf->hw.i2c_slv4_ctrl & BIT_SLV_EN));
/* HW port delay enable */