Lines Matching refs:scale_shift
293 int8_t scale_shift = 0; in bmi160_emul_backend_set_channel() local
305 scale_shift = 6; in bmi160_emul_backend_set_channel()
308 scale_shift = 7; in bmi160_emul_backend_set_channel()
311 scale_shift = 8; in bmi160_emul_backend_set_channel()
314 scale_shift = 5; in bmi160_emul_backend_set_channel()
326 scale_shift = 6; in bmi160_emul_backend_set_channel()
329 scale_shift = 5; in bmi160_emul_backend_set_channel()
332 scale_shift = 4; in bmi160_emul_backend_set_channel()
335 scale_shift = 3; in bmi160_emul_backend_set_channel()
338 scale_shift = 2; in bmi160_emul_backend_set_channel()
347 scale_shift = 7; in bmi160_emul_backend_set_channel()
353 if (shift < scale_shift) { in bmi160_emul_backend_set_channel()
355 intermediate >>= scale_shift - shift; in bmi160_emul_backend_set_channel()
356 } else if (shift > 0 && shift > scale_shift) { in bmi160_emul_backend_set_channel()
358 intermediate <<= shift - scale_shift; in bmi160_emul_backend_set_channel()
363 intermediate -= INT64_C(23) << (31 - scale_shift); in bmi160_emul_backend_set_channel()
457 int8_t scale_shift = 0; in bmi160_emul_backend_set_offset() local
491 if (shift > scale_shift) { in bmi160_emul_backend_set_offset()
493 intermediate <<= (shift - scale_shift); in bmi160_emul_backend_set_offset()
494 } else if (shift < scale_shift) { in bmi160_emul_backend_set_offset()
496 scale >>= (scale_shift - shift); in bmi160_emul_backend_set_offset()