diff options
-rw-r--r-- | driver/accelgyro_lsm6dsm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/accelgyro_lsm6dsm.c b/driver/accelgyro_lsm6dsm.c index 29c21618a7..da445ec491 100644 --- a/driver/accelgyro_lsm6dsm.c +++ b/driver/accelgyro_lsm6dsm.c @@ -444,7 +444,7 @@ static int set_data_rate(const struct motion_sensor_t *s, int rate, int rnd) if (rnd && (normalized_rate < rate)) { reg_val++; - normalized_rate *= 2; + normalized_rate = LSM6DSM_REG_TO_ODR(reg_val); } if (normalized_rate == 0) return EC_RES_INVALID_PARAM; |