forked from rubenslte/android_kernel_samsung_msm8226
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user