Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12a15ada authored by Bingzhe Cai's avatar Bingzhe Cai
Browse files

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.

Change-Id: If59900b244b31f813dd17e72b19c7fd2ca4b4ba1
Signed-off-by: default avatarBingzhe Cai <bingzhec@codeaurora.org>
parent 77ea4f2d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;