Lines Matching refs:fifo

104 	if (st->fifo.en & INV_ICM42600_SENSOR_GYRO)  in inv_icm42600_buffer_update_fifo_period()
109 if (st->fifo.en & INV_ICM42600_SENSOR_ACCEL) in inv_icm42600_buffer_update_fifo_period()
119 st->fifo.period = period; in inv_icm42600_buffer_update_fifo_period()
146 st->fifo.en = fifo_en; in inv_icm42600_buffer_set_fifo_en()
212 packet_size = inv_icm42600_get_packet_size(st->fifo.en); in inv_icm42600_buffer_update_watermark()
215 wm_gyro = inv_icm42600_wm_truncate(st->fifo.watermark.gyro, packet_size); in inv_icm42600_buffer_update_watermark()
216 wm_accel = inv_icm42600_wm_truncate(st->fifo.watermark.accel, packet_size); in inv_icm42600_buffer_update_watermark()
296 if (st->fifo.on) { in inv_icm42600_buffer_postenable()
327 st->fifo.on++; in inv_icm42600_buffer_postenable()
341 if (st->fifo.on > 1) { in inv_icm42600_buffer_predisable()
366 st->fifo.on--; in inv_icm42600_buffer_predisable()
387 watermark = &st->fifo.watermark.gyro; in inv_icm42600_buffer_postdisable()
391 watermark = &st->fifo.watermark.accel; in inv_icm42600_buffer_postdisable()
399 ret = inv_icm42600_buffer_set_fifo_en(st, st->fifo.en & ~sensor); in inv_icm42600_buffer_postdisable()
417 if (!st->fifo.on) in inv_icm42600_buffer_postdisable()
458 st->fifo.count = 0; in inv_icm42600_buffer_fifo_read()
459 st->fifo.nb.gyro = 0; in inv_icm42600_buffer_fifo_read()
460 st->fifo.nb.accel = 0; in inv_icm42600_buffer_fifo_read()
461 st->fifo.nb.total = 0; in inv_icm42600_buffer_fifo_read()
465 max_count = sizeof(st->fifo.data); in inv_icm42600_buffer_fifo_read()
467 max_count = max * inv_icm42600_get_packet_size(st->fifo.en); in inv_icm42600_buffer_fifo_read()
475 st->fifo.count = be16_to_cpup(raw_fifo_count); in inv_icm42600_buffer_fifo_read()
478 if (st->fifo.count == 0) in inv_icm42600_buffer_fifo_read()
480 if (st->fifo.count > max_count) in inv_icm42600_buffer_fifo_read()
481 st->fifo.count = max_count; in inv_icm42600_buffer_fifo_read()
485 st->fifo.data, st->fifo.count); in inv_icm42600_buffer_fifo_read()
490 for (i = 0; i < st->fifo.count; i += size) { in inv_icm42600_buffer_fifo_read()
491 size = inv_icm42600_fifo_decode_packet(&st->fifo.data[i], in inv_icm42600_buffer_fifo_read()
496 st->fifo.nb.gyro++; in inv_icm42600_buffer_fifo_read()
498 st->fifo.nb.accel++; in inv_icm42600_buffer_fifo_read()
499 st->fifo.nb.total++; in inv_icm42600_buffer_fifo_read()
510 if (st->fifo.nb.total == 0) in inv_icm42600_buffer_fifo_parse()
515 inv_icm42600_timestamp_interrupt(ts, st->fifo.period, st->fifo.nb.total, in inv_icm42600_buffer_fifo_parse()
516 st->fifo.nb.gyro, st->timestamp.gyro); in inv_icm42600_buffer_fifo_parse()
517 if (st->fifo.nb.gyro > 0) { in inv_icm42600_buffer_fifo_parse()
525 inv_icm42600_timestamp_interrupt(ts, st->fifo.period, st->fifo.nb.total, in inv_icm42600_buffer_fifo_parse()
526 st->fifo.nb.accel, st->timestamp.accel); in inv_icm42600_buffer_fifo_parse()
527 if (st->fifo.nb.accel > 0) { in inv_icm42600_buffer_fifo_parse()
550 if (st->fifo.nb.total == 0) in inv_icm42600_buffer_hwfifo_flush()
553 if (st->fifo.nb.gyro > 0) { in inv_icm42600_buffer_hwfifo_flush()
555 inv_icm42600_timestamp_interrupt(ts, st->fifo.period, in inv_icm42600_buffer_hwfifo_flush()
556 st->fifo.nb.total, st->fifo.nb.gyro, in inv_icm42600_buffer_hwfifo_flush()
563 if (st->fifo.nb.accel > 0) { in inv_icm42600_buffer_hwfifo_flush()
565 inv_icm42600_timestamp_interrupt(ts, st->fifo.period, in inv_icm42600_buffer_hwfifo_flush()
566 st->fifo.nb.total, st->fifo.nb.accel, in inv_icm42600_buffer_hwfifo_flush()