diff options
| -rw-r--r-- | drivers/iio/imu/st_lsm6ds3/st_lsm6ds3_core.c | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/drivers/iio/imu/st_lsm6ds3/st_lsm6ds3_core.c b/drivers/iio/imu/st_lsm6ds3/st_lsm6ds3_core.c index 00948755125..089a28fde8c 100644 --- a/drivers/iio/imu/st_lsm6ds3/st_lsm6ds3_core.c +++ b/drivers/iio/imu/st_lsm6ds3/st_lsm6ds3_core.c @@ -802,8 +802,10 @@ int st_lsm6ds3_set_fifo_decimators_and_threshold(struct lsm6ds3_data *cdata)  	if (fifo_len > 0) {  		fifo_threshold = fifo_len / 2; -        if(fifo_threshold > cdata->min_latency_samples * ST_LSM6DS3_FIFO_ELEMENT_LEN_BYTE) +        if(fifo_threshold > cdata->min_latency_samples * ST_LSM6DS3_FIFO_ELEMENT_LEN_BYTE){              fifo_threshold = cdata->min_latency_samples * ST_LSM6DS3_FIFO_ELEMENT_LEN_BYTE; +            fifo_threshold /= 2; //LSB of the register is 1 word +        }  		dev_info(cdata->dev,"setting FIFO length/threshold: 0x%x 0x%x ", fifo_len, fifo_threshold); |