input: sensors: fix accelerometer output data rate issue

Accelerometer data output rate is limited by device ODR register,
no need to configure this register in polling mode.

CRs-Fixed: 641705
Change-Id: If59900b244b31f813dd17e72b19c7fd2ca4b4ba1
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
This commit is contained in:
Bingzhe Cai
2014-04-09 17:19:44 +08:00
parent 8d9bc57c4c
commit 24401c06c1
+5
View File
@@ -394,9 +394,14 @@ static int mma8x5x_delay2odr(u32 delay_ms)
static int mma8x5x_device_set_odr(struct i2c_client *client, u32 delay_ms)
{
struct mma8x5x_data *pdata = i2c_get_clientdata(client);
int result;
u8 val;
/* set ODR is only required for interrupt mode */
if (!pdata->use_int)
return 0;
result = mma8x5x_delay2odr(delay_ms);
if (result < 0)
goto out;