* [PATCH 0/2] docs: iio: update dated triggered buffer example
@ 2026-05-17 17:00 David Lechner
2026-05-17 17:00 ` [PATCH 1/2] MAINTAINERS: add match for IIO API docs David Lechner
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: David Lechner @ 2026-05-17 17:00 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, Jonathan Cameron, Nuno Sá,
Andy Shevchenko
Cc: linux-doc, linux-kernel, linux-iio, David Lechner
Noticed this example was out of date while grepping for something else.
And when I did get_maintainer.pl on it, it didn't match the IIO
subsystem, so we get a bonus patch to fix that too.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
David Lechner (2):
MAINTAINERS: add match for IIO API docs
docs: iio: triggered-buffers: use new helpers in example
Documentation/driver-api/iio/triggered-buffers.rst | 8 ++++----
MAINTAINERS | 1 +
2 files changed, 5 insertions(+), 4 deletions(-)
---
base-commit: 8678fb54958893818ddeccd05fea560a4e1fc759
change-id: 20260517-iio-doc-triggered-buffer-update-helpers-ef7e3895c9f4
Best regards,
--
David Lechner <dlechner@baylibre.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/2] MAINTAINERS: add match for IIO API docs
2026-05-17 17:00 [PATCH 0/2] docs: iio: update dated triggered buffer example David Lechner
@ 2026-05-17 17:00 ` David Lechner
2026-05-17 17:55 ` Stepan Ionichev
2026-05-17 17:00 ` [PATCH 2/2] docs: iio: triggered-buffers: use new helpers in example David Lechner
2026-05-18 15:33 ` [PATCH 0/2] docs: iio: update dated triggered buffer example Jonathan Cameron
2 siblings, 1 reply; 6+ messages in thread
From: David Lechner @ 2026-05-17 17:00 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, Jonathan Cameron, Nuno Sá,
Andy Shevchenko
Cc: linux-doc, linux-kernel, linux-iio, David Lechner
Add a match for Documentation/driver-api/iio/ to the IIO subsystem in
MAINTAINERS. Any changes to the IIO API documentation should be reviewed
IIO folks.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 0de74503df08..d14854677649 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12512,6 +12512,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
F: Documentation/ABI/testing/configfs-iio*
F: Documentation/ABI/testing/sysfs-bus-iio*
F: Documentation/devicetree/bindings/iio/
+F: Documentation/driver-api/iio/
F: Documentation/iio/
F: drivers/iio/
F: drivers/staging/iio/
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] MAINTAINERS: add match for IIO API docs
2026-05-17 17:00 ` [PATCH 1/2] MAINTAINERS: add match for IIO API docs David Lechner
@ 2026-05-17 17:55 ` Stepan Ionichev
0 siblings, 0 replies; 6+ messages in thread
From: Stepan Ionichev @ 2026-05-17 17:55 UTC (permalink / raw)
To: dlechner
Cc: corbet, skhan, jic23, nuno.sa, andy, linux-doc, linux-kernel,
linux-iio, Stepan Ionichev
On Sun, May 17, 2026, David Lechner wrote:
> Add a match for Documentation/driver-api/iio/ to the IIO subsystem in
> MAINTAINERS. Any changes to the IIO API documentation should be reviewed
> IIO folks.
Reviewed-by: Stepan Ionichev <sozdayvek@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] docs: iio: triggered-buffers: use new helpers in example
2026-05-17 17:00 [PATCH 0/2] docs: iio: update dated triggered buffer example David Lechner
2026-05-17 17:00 ` [PATCH 1/2] MAINTAINERS: add match for IIO API docs David Lechner
@ 2026-05-17 17:00 ` David Lechner
2026-05-17 17:56 ` Stepan Ionichev
2026-05-18 15:33 ` [PATCH 0/2] docs: iio: update dated triggered buffer example Jonathan Cameron
2 siblings, 1 reply; 6+ messages in thread
From: David Lechner @ 2026-05-17 17:00 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, Jonathan Cameron, Nuno Sá,
Andy Shevchenko
Cc: linux-doc, linux-kernel, linux-iio, David Lechner
Update the "typical" triggered buffer example to use various new helpers
that have been added in the last year or so. This reflects current
expectations of how similar code should be written.
Also zero-initialize the buffer so we don't leak stack data. And fix a
missing semicolon while we're at it.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
Documentation/driver-api/iio/triggered-buffers.rst | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/driver-api/iio/triggered-buffers.rst b/Documentation/driver-api/iio/triggered-buffers.rst
index 23b82357eba6..23762b06fdc6 100644
--- a/Documentation/driver-api/iio/triggered-buffers.rst
+++ b/Documentation/driver-api/iio/triggered-buffers.rst
@@ -29,14 +29,14 @@ A typical triggered buffer setup looks like this::
irqreturn_t sensor_trigger_handler(int irq, void *p)
{
- u16 buf[8];
+ IIO_DECLARE_BUFFER_WITH_TS(u16, buf, 3) = { };
int i = 0;
/* read data for each active channel */
- for_each_set_bit(bit, active_scan_mask, masklength)
- buf[i++] = sensor_get_data(bit)
+ iio_for_each_active_channel(indio_dev, bit)
+ buf[i++] = sensor_get_data(bit);
- iio_push_to_buffers_with_timestamp(indio_dev, buf, timestamp);
+ iio_push_to_buffers_with_ts(indio_dev, buf, sizeof(buf), timestamp);
iio_trigger_notify_done(trigger);
return IRQ_HANDLED;
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 2/2] docs: iio: triggered-buffers: use new helpers in example
2026-05-17 17:00 ` [PATCH 2/2] docs: iio: triggered-buffers: use new helpers in example David Lechner
@ 2026-05-17 17:56 ` Stepan Ionichev
0 siblings, 0 replies; 6+ messages in thread
From: Stepan Ionichev @ 2026-05-17 17:56 UTC (permalink / raw)
To: dlechner
Cc: corbet, skhan, jic23, nuno.sa, andy, linux-doc, linux-kernel,
linux-iio, Stepan Ionichev
On Sun, May 17, 2026, David Lechner wrote:
> Update the "typical" triggered buffer example to use various new helpers
> that have been added in the last year or so. This reflects current
> expectations of how similar code should be written.
Reviewed-by: Stepan Ionichev <sozdayvek@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] docs: iio: update dated triggered buffer example
2026-05-17 17:00 [PATCH 0/2] docs: iio: update dated triggered buffer example David Lechner
2026-05-17 17:00 ` [PATCH 1/2] MAINTAINERS: add match for IIO API docs David Lechner
2026-05-17 17:00 ` [PATCH 2/2] docs: iio: triggered-buffers: use new helpers in example David Lechner
@ 2026-05-18 15:33 ` Jonathan Cameron
2 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2026-05-18 15:33 UTC (permalink / raw)
To: David Lechner
Cc: Jonathan Corbet, Shuah Khan, Nuno Sá, Andy Shevchenko,
linux-doc, linux-kernel, linux-iio
On Sun, 17 May 2026 12:00:57 -0500
David Lechner <dlechner@baylibre.com> wrote:
> Noticed this example was out of date while grepping for something else.
> And when I did get_maintainer.pl on it, it didn't match the IIO
> subsystem, so we get a bonus patch to fix that too.
>
> Signed-off-by: David Lechner <dlechner@baylibre.com>
> ---
> David Lechner (2):
> MAINTAINERS: add match for IIO API docs
Well I suppose we 'should' maintain those :)
> docs: iio: triggered-buffers: use new helpers in example
Series applied.
Thanks,
Jonathan
>
> Documentation/driver-api/iio/triggered-buffers.rst | 8 ++++----
> MAINTAINERS | 1 +
> 2 files changed, 5 insertions(+), 4 deletions(-)
> ---
> base-commit: 8678fb54958893818ddeccd05fea560a4e1fc759
> change-id: 20260517-iio-doc-triggered-buffer-update-helpers-ef7e3895c9f4
>
> Best regards,
> --
> David Lechner <dlechner@baylibre.com>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-05-18 15:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-17 17:00 [PATCH 0/2] docs: iio: update dated triggered buffer example David Lechner
2026-05-17 17:00 ` [PATCH 1/2] MAINTAINERS: add match for IIO API docs David Lechner
2026-05-17 17:55 ` Stepan Ionichev
2026-05-17 17:00 ` [PATCH 2/2] docs: iio: triggered-buffers: use new helpers in example David Lechner
2026-05-17 17:56 ` Stepan Ionichev
2026-05-18 15:33 ` [PATCH 0/2] docs: iio: update dated triggered buffer example Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox