Lines Matching full:timestamp

58 	return cb(indio_dev, sample->vector, sample->timestamp);  in cros_sensorhub_send_sample()
205 * IRQ Timestamp Filtering
208 * we have to calculate it's timestamp in the AP timebase. There are 3 time
257 * @b: IRQ timestamp, EC timebase (us)
258 * @c: IRQ timestamp, AP timebase (ns)
260 * Given a new IRQ timestamp pair (EC and AP timebases), add it to the filter
340 * cros_ec_sensor_ring_ts_filter() - Translate EC timebase timestamp to AP
344 * @x: any ec timestamp (us):
346 * cros_ec_sensor_ring_ts_filter(a) => a' event timestamp, AP timebase
347 * cros_ec_sensor_ring_ts_filter(b) => calculated timestamp when the EC IRQ
362 * Return: timestamp in AP timebase (ns)
404 sample->timestamp) in cros_ec_sensor_ring_check_for_past_timestamp()
406 sample->timestamp = in cros_ec_sensor_ring_check_for_past_timestamp()
410 sample->timestamp; in cros_ec_sensor_ring_check_for_past_timestamp()
419 * @current_timestamp: calculated event timestamp, kernel timebase (aka a').
444 s64 a = in->timestamp; in cros_ec_sensor_ring_process_event()
445 s64 b = fifo_info->timestamp; in cros_ec_sensor_ring_process_event()
467 * The timestamp can be stale if we had to use the fifo in cros_ec_sensor_ring_process_event()
468 * info timestamp. in cros_ec_sensor_ring_process_event()
473 trace_cros_ec_sensorhub_timestamp(in->timestamp, in cros_ec_sensor_ring_process_event()
474 fifo_info->timestamp, in cros_ec_sensor_ring_process_event()
494 out->timestamp = *current_timestamp; in cros_ec_sensor_ring_process_event()
506 /* If we just have a timestamp, skip this entry. */ in cros_ec_sensor_ring_process_event()
512 fifo_info->timestamp, in cros_ec_sensor_ring_process_event()
519 * This fix is needed to overcome the timestamp filter putting in cros_ec_sensor_ring_process_event()
534 out->timestamp = now; in cros_ec_sensor_ring_process_event()
536 out->timestamp = *current_timestamp; in cros_ec_sensor_ring_process_event()
552 * This is the new spreading code, assumes every sample's timestamp
555 * Sometimes the EC receives only one interrupt (hence timestamp) for
557 * timestamp. So we must interpolate the other samples.
558 * We use the previous batch timestamp and our current batch timestamp
566 * s3 sample, 20ms (incorrect timestamp)
570 * has 2 samples in them, we adjust the timestamp of s3.
592 * timestamp). in cros_ec_sensor_ring_spread_add()
598 s64 batch_timestamp = batch_start->timestamp; in cros_ec_sensor_ring_spread_add()
622 if (batch_start->timestamp <= in cros_ec_sensor_ring_spread_add()
647 /* Find all samples have the same timestamp. */ in cros_ec_sensor_ring_spread_add()
655 if (s->timestamp != batch_timestamp) in cros_ec_sensor_ring_spread_add()
704 s->timestamp = batch_timestamp + in cros_ec_sensor_ring_spread_add()
730 * Note: This assumes we're running old firmware, where timestamp
732 * timestamps, so several samples can have the same timestamp.
734 * timestamp | count
758 s64 timestamp; in cros_ec_sensor_ring_spread_add_legacy() local
766 /* Timestamp to start with */ in cros_ec_sensor_ring_spread_add_legacy()
767 timestamp = out->timestamp; in cros_ec_sensor_ring_spread_add_legacy()
782 time_period = div_s64(current_timestamp - timestamp, count); in cros_ec_sensor_ring_spread_add_legacy()
787 timestamp += time_period; in cros_ec_sensor_ring_spread_add_legacy()
788 out->timestamp = timestamp; in cros_ec_sensor_ring_spread_add_legacy()
912 * the EC appends a timestamp after the last sample, but if the AP in cros_ec_sensorhub_ring_handler()
914 * Use the FIFO info timestamp as last timestamp then. in cros_ec_sensorhub_ring_handler()
917 (last_out - 1)->timestamp == current_timestamp) in cros_ec_sensorhub_ring_handler()