Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: buffer: document iio_push_to_buffers_with_ts()

Document the iio_push_to_buffers_with_ts() function.

This is copied and slightly cleaned up from
iio_push_to_buffers_with_timestamp().

Signed-off-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

David Lechner and committed by
Jonathan Cameron
536bf30d a8c8aad4

+16
+16
include/linux/iio/buffer.h
··· 45 45 return iio_push_to_buffers(indio_dev, data); 46 46 } 47 47 48 + /** 49 + * iio_push_to_buffers_with_ts() - push data and timestamp to buffers 50 + * @indio_dev: iio_dev structure for device. 51 + * @data: Pointer to sample data buffer. 52 + * @data_total_len: The size of @data in bytes. 53 + * @timestamp: Timestamp for the sample data. 54 + * 55 + * Pushes data to the IIO device's buffers. If timestamps are enabled for the 56 + * device the function will store the supplied timestamp as the last element in 57 + * the sample data buffer before pushing it to the device buffers. The sample 58 + * data buffer needs to be large enough to hold the additional timestamp 59 + * (usually the buffer should be at least indio->scan_bytes bytes large). 60 + * 61 + * Context: Any context. 62 + * Return: 0 on success, a negative error code otherwise. 63 + */ 48 64 static inline int iio_push_to_buffers_with_ts(struct iio_dev *indio_dev, 49 65 void *data, size_t data_total_len, 50 66 s64 timestamp)