iio:core: timestamping clock selection support
Adds a new per-device sysfs attribute "current_timestamp_clock" to allow userspace to select a particular POSIX clock for buffered samples and events timestamping. Following clocks, as listed in clock_gettime(2), are supported: CLOCK_REALTIME, CLOCK_MONOTONIC, CLOCK_MONOTONIC_RAW, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE, CLOCK_BOOTTIME and CLOCK_TAI. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Acked-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:

committed by
Jonathan Cameron

parent
eaaa7ec71b
commit
bc2b7dab62
@@ -594,7 +594,8 @@ static irqreturn_t vf610_adc_isr(int irq, void *dev_id)
|
||||
if (iio_buffer_enabled(indio_dev)) {
|
||||
info->buffer[0] = info->value;
|
||||
iio_push_to_buffers_with_timestamp(indio_dev,
|
||||
info->buffer, iio_get_time_ns());
|
||||
info->buffer,
|
||||
iio_get_time_ns(indio_dev));
|
||||
iio_trigger_notify_done(indio_dev->trig);
|
||||
} else
|
||||
complete(&info->completion);
|
||||
|
Reference in New Issue
Block a user