On Fri, 12 Sep 2025 11:05:51 -0500
David Lechner <dlechner@baylibre.com> wrote:
> It came up in a recent discussion [1] that we need to be careful about
> the calling context for various iio_push_to_buffer*() functions. Here is
> a series that adds some documentation in a number of places to make this
> a bit more visible.
>
> [1]: https://lore.kernel.org/linux-iio/CAHp75Vc8u2N2AHWtnPRmRXWKN3u8Qi=yvx5afbFh4NLNb8-y9A@mail.gmail.com/
>
> ---
> David Lechner (7):
> iio: buffer: document iio_push_to_buffers_with_ts_unaligned() may sleep
> iio: buffer: iio_push_to_buffers_with_ts_unaligned() might_sleep()
> iio: buffer: document iio_push_to_buffers_with_ts()
> iio: buffer: deprecated iio_push_to_buffers_with_timestamp()
> iio: buffer: document iio_push_to_buffers() calling context
> iio: buffer: document store_to() callback may be called in any context
> iio: buffer: document that buffer callback must be context safe
>
> drivers/iio/buffer/industrialio-buffer-cb.c | 1 +
> drivers/iio/industrialio-buffer.c | 8 ++++++++
> include/linux/iio/buffer.h | 22 +++++++++++++++++-----
> include/linux/iio/buffer_impl.h | 3 ++-
> include/linux/iio/consumer.h | 3 ++-
> 5 files changed, 30 insertions(+), 7 deletions(-)
> ---
> base-commit: b8902d55155cec7bd743dc1129e0b32e70b1751f
> change-id: 20250912-iio-doc-push-to-buffers-context-df3ca98fe0df
>
> Best regards,
Whilst this is very nearly good to go (assuming the might_sleep() discussion
is done), I'm going to be lazy and ask for a v2 to resolve that DEPRECATED
comment style thing and the tiny change I asked for.
Thanks for doing this and I'm a bit embarrassed that I didn't document
the with_ts() function when introducing it :(
Jonathan