diff options
| author | David Lechner <dlechner@baylibre.com> | 2025-09-16 16:02:53 -0500 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-10-13 08:37:23 +0100 |
| commit | 536bf30d282a6b2f676c6106587f0e1946449aca (patch) | |
| tree | d1b1a8fc30ec16c1802a04a3b0f18534e10cf1c3 /include/linux | |
| parent | a8c8aad411554755ab59621dc6961db8a4c8af7a (diff) | |
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>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/iio/buffer.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/iio/buffer.h b/include/linux/iio/buffer.h index 5c84ec4a9810..e46b818981aa 100644 --- a/include/linux/iio/buffer.h +++ b/include/linux/iio/buffer.h @@ -45,6 +45,22 @@ static inline int iio_push_to_buffers_with_timestamp(struct iio_dev *indio_dev, return iio_push_to_buffers(indio_dev, data); } +/** + * iio_push_to_buffers_with_ts() - push data and timestamp to buffers + * @indio_dev: iio_dev structure for device. + * @data: Pointer to sample data buffer. + * @data_total_len: The size of @data in bytes. + * @timestamp: Timestamp for the sample data. + * + * Pushes data to the IIO device's buffers. If timestamps are enabled for the + * device the function will store the supplied timestamp as the last element in + * the sample data buffer before pushing it to the device buffers. The sample + * data buffer needs to be large enough to hold the additional timestamp + * (usually the buffer should be at least indio->scan_bytes bytes large). + * + * Context: Any context. + * Return: 0 on success, a negative error code otherwise. + */ static inline int iio_push_to_buffers_with_ts(struct iio_dev *indio_dev, void *data, size_t data_total_len, s64 timestamp) |
