[PATCH 4/7] iio: buffer: deprecated iio_push_to_buffers_with_timestamp()

David Lechner posted 7 patches 2 weeks, 6 days ago
There is a newer version of this series
[PATCH 4/7] iio: buffer: deprecated iio_push_to_buffers_with_timestamp()
Posted by David Lechner 2 weeks, 6 days ago
Replace the documentation of iio_push_to_buffers_with_timestamp() with
a deprecation notice pointing to the preferred alternative.

Signed-off-by: David Lechner <dlechner@baylibre.com>
---
 include/linux/iio/buffer.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/include/linux/iio/buffer.h b/include/linux/iio/buffer.h
index 47f23bc0470eaf308fc3a739faaf9b56cac0ef67..f07f6bae0cb25b0f51bd671206177508d1064b79 100644
--- a/include/linux/iio/buffer.h
+++ b/include/linux/iio/buffer.h
@@ -26,11 +26,7 @@ int iio_pop_from_buffer(struct iio_buffer *buffer, void *data);
  * @data:		sample data
  * @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 indio->scan_bytes bytes large).
+ * This function is deprecated. Use iio_push_to_buffers_with_ts() instead.
  *
  * Returns 0 on success, a negative error code otherwise.
  */

-- 
2.43.0
Re: [PATCH 4/7] iio: buffer: deprecated iio_push_to_buffers_with_timestamp()
Posted by Andy Shevchenko 2 weeks, 6 days ago
On Fri, Sep 12, 2025 at 11:05:55AM -0500, David Lechner wrote:
> Replace the documentation of iio_push_to_buffers_with_timestamp() with
> a deprecation notice pointing to the preferred alternative.

...

> + * This function is deprecated. Use iio_push_to_buffers_with_ts() instead.

There is informal practice to mark function deprecated (in the kernel
documentation), it's something like using capitalised DEPRECATED. Grep for
better examples.

-- 
With Best Regards,
Andy Shevchenko