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

Commit 1a7f55c5 authored by Puneet Yatnal's avatar Puneet Yatnal
Browse files

drivers: iio: imu: decreased the ASM buffer size and IAM timeout



Decrease the ASM buffer size to 6 and IAM timeout to 10ms,so that
on each interrupt,driver can read only minimum number of samples
from sensors.

Change-Id: Ie760e94701d4dade626fb101b0f23330419a063a
Signed-off-by: default avatarPuneet Yatnal <puneet@codeaurora.org>
parent 0124482b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ static int inv_set_batch(struct inv_mpu_state *st)
	int required_fifo_size;

#ifdef CONFIG_ENABLE_IAM_ACC_GYRO_BUFFERING
	st->batch.timeout = 100;
	st->batch.timeout = 10;
#endif
	if (st->batch.timeout) {
		required_fifo_size = st->batch.timeout * st->eng_info[ENGINE_GYRO].running_rate
+1 −1
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ static void store_acc_gyro_boot_sample(struct st_asm330lhh_sensor *sensor,
static int st_asm330lhh_read_fifo(struct st_asm330lhh_hw *hw)
{
	u8 iio_buf[ALIGN(ST_ASM330LHH_SAMPLE_SIZE, sizeof(s64)) + sizeof(s64)];
	u8 buf[30 * ST_ASM330LHH_FIFO_SAMPLE_SIZE], tag, *ptr;
	u8 buf[6 * ST_ASM330LHH_FIFO_SAMPLE_SIZE], tag, *ptr;
	s64 ts_delta_hw_ts = 0, ts_irq;
	s64 ts_delta_offs;
	int i, err, read_len, word_len, fifo_len;