iio: imu: icm40605: fix the problem that IIO can not fetch data

Signed-off-by: Yihao Zhang <yihoyo.zhang@rock-chips.com>
Change-Id: I0c59b0d696871279ff2674bfc203e12a993aab70
This commit is contained in:
Yihao Zhang
2023-06-28 09:50:26 +08:00
committed by Tao Huang
parent e72909392c
commit c6305a462d
2 changed files with 2 additions and 3 deletions

View File

@ -361,6 +361,7 @@ enum ICM406xx_fio_format {
#define FIFO_FSYNC_BITS 0x0C
#define HAVANA_MAX_PACKET_SIZE 20
#define ICM40605_FIFO_COUNT_LIMIT 60
#define ICM40605_DATA_BUFF_SIZE 960
// BANK SEL
enum icm40605_bank_index {
@ -427,7 +428,7 @@ struct icm40605_data {
s64 period_max;
int period_divider;
int interrupt_regval;
u8 data_buff[ICM40605_FIFO_COUNT_LIMIT];
u8 data_buff[ICM40605_DATA_BUFF_SIZE];
};
/* scan indexes follow DATA register order */

View File

@ -224,8 +224,6 @@ irqreturn_t icm40605_read_fifo(int irq, void *p)
icm40605_update_period(st, pf->timestamp, fifo_count);
data_len = bytes_per_datum * fifo_count;
if (data_len > ICM40605_FIFO_COUNT_LIMIT)
data_len = ICM40605_FIFO_COUNT_LIMIT;
result = regmap_bulk_read(st->regmap, MPUREG_FIFO_DATA_REG,
st->data_buff, data_len);