Lines Matching refs:shift
17 static int icm42688_get_shift(enum sensor_channel channel, int accel_fs, int gyro_fs, int8_t *shift) in icm42688_get_shift() argument
26 *shift = 5; in icm42688_get_shift()
29 *shift = 6; in icm42688_get_shift()
32 *shift = 7; in icm42688_get_shift()
35 *shift = 8; in icm42688_get_shift()
46 *shift = -1; in icm42688_get_shift()
49 *shift = 0; in icm42688_get_shift()
52 *shift = 1; in icm42688_get_shift()
55 *shift = 2; in icm42688_get_shift()
58 *shift = 3; in icm42688_get_shift()
61 *shift = 4; in icm42688_get_shift()
64 *shift = 5; in icm42688_get_shift()
67 *shift = 6; in icm42688_get_shift()
73 *shift = 9; in icm42688_get_shift()
86 int8_t shift; in icm42688_convert_raw_to_q31() local
89 rc = icm42688_get_shift(chan, cfg->accel_fs, cfg->gyro_fs, &shift); in icm42688_convert_raw_to_q31()
114 if (shift < 0) { in icm42688_convert_raw_to_q31()
116 intermediate * ((int64_t)INT32_MAX + 1) * (1 << -shift) / INT64_C(1000000); in icm42688_convert_raw_to_q31()
117 } else if (shift > 0) { in icm42688_convert_raw_to_q31()
119 intermediate * ((int64_t)INT32_MAX + 1) / ((1 << shift) * INT64_C(1000000)); in icm42688_convert_raw_to_q31()
393 data->shift = 9; in icm42688_fifo_decode()
410 edata->header.gyro_fs, &data->shift); in icm42688_fifo_decode()
431 edata->header.gyro_fs, &data->shift); in icm42688_fifo_decode()
487 &out->shift); in icm42688_one_shot_decode()
521 &out->shift); in icm42688_one_shot_decode()
554 &out->shift); in icm42688_one_shot_decode()