Lines Matching full:timestamp

58 	return cb(indio_dev, sample->vector, sample->timestamp);  in cros_sensorhub_send_sample()
194 * IRQ Timestamp Filtering
197 * we have to calculate it's timestamp in the AP timebase. There are 3 time
246 * @b: IRQ timestamp, EC timebase (us)
247 * @c: IRQ timestamp, AP timebase (ns)
249 * Given a new IRQ timestamp pair (EC and AP timebases), add it to the filter
329 * cros_ec_sensor_ring_ts_filter() - Translate EC timebase timestamp to AP
333 * @x: any ec timestamp (us):
335 * cros_ec_sensor_ring_ts_filter(a) => a' event timestamp, AP timebase
336 * cros_ec_sensor_ring_ts_filter(b) => calculated timestamp when the EC IRQ
351 * Return: timestamp in AP timebase (ns)
393 sample->timestamp) in cros_ec_sensor_ring_check_for_past_timestamp()
395 sample->timestamp = in cros_ec_sensor_ring_check_for_past_timestamp()
399 sample->timestamp; in cros_ec_sensor_ring_check_for_past_timestamp()
408 * @current_timestamp: calculated event timestamp, kernel timebase (aka a').
433 s64 a = in->timestamp; in cros_ec_sensor_ring_process_event()
434 s64 b = fifo_info->timestamp; in cros_ec_sensor_ring_process_event()
456 * The timestamp can be stale if we had to use the fifo in cros_ec_sensor_ring_process_event()
457 * info timestamp. in cros_ec_sensor_ring_process_event()
462 trace_cros_ec_sensorhub_timestamp(in->timestamp, in cros_ec_sensor_ring_process_event()
463 fifo_info->timestamp, in cros_ec_sensor_ring_process_event()
483 out->timestamp = *current_timestamp; in cros_ec_sensor_ring_process_event()
495 /* If we just have a timestamp, skip this entry. */ in cros_ec_sensor_ring_process_event()
501 fifo_info->timestamp, in cros_ec_sensor_ring_process_event()
508 * This fix is needed to overcome the timestamp filter putting in cros_ec_sensor_ring_process_event()
523 out->timestamp = now; in cros_ec_sensor_ring_process_event()
525 out->timestamp = *current_timestamp; in cros_ec_sensor_ring_process_event()
541 * This is the new spreading code, assumes every sample's timestamp
544 * Sometimes the EC receives only one interrupt (hence timestamp) for
546 * timestamp. So we must interpolate the other samples.
547 * We use the previous batch timestamp and our current batch timestamp
555 * s3 sample, 20ms (incorrect timestamp)
559 * has 2 samples in them, we adjust the timestamp of s3.
581 * timestamp). in cros_ec_sensor_ring_spread_add()
587 s64 batch_timestamp = batch_start->timestamp; in cros_ec_sensor_ring_spread_add()
611 if (batch_start->timestamp <= in cros_ec_sensor_ring_spread_add()
636 /* Find all samples have the same timestamp. */ in cros_ec_sensor_ring_spread_add()
644 if (s->timestamp != batch_timestamp) in cros_ec_sensor_ring_spread_add()
693 s->timestamp = batch_timestamp + in cros_ec_sensor_ring_spread_add()
719 * Note: This assumes we're running old firmware, where timestamp
721 * timestamps, so several samples can have the same timestamp.
723 * timestamp | count
747 s64 timestamp; in cros_ec_sensor_ring_spread_add_legacy() local
755 /* Timestamp to start with */ in cros_ec_sensor_ring_spread_add_legacy()
756 timestamp = out->timestamp; in cros_ec_sensor_ring_spread_add_legacy()
771 time_period = div_s64(current_timestamp - timestamp, count); in cros_ec_sensor_ring_spread_add_legacy()
776 timestamp += time_period; in cros_ec_sensor_ring_spread_add_legacy()
777 out->timestamp = timestamp; in cros_ec_sensor_ring_spread_add_legacy()
901 * the EC appends a timestamp after the last sample, but if the AP in cros_ec_sensorhub_ring_handler()
903 * Use the FIFO info timestamp as last timestamp then. in cros_ec_sensorhub_ring_handler()
906 (last_out - 1)->timestamp == current_timestamp) in cros_ec_sensorhub_ring_handler()