* [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp()
@ 2026-03-16 17:27 Atharv Dubey
2026-03-16 17:27 ` Atharv Dubey
` (9 more replies)
0 siblings, 10 replies; 15+ messages in thread
From: Atharv Dubey @ 2026-03-16 17:27 UTC (permalink / raw)
To: jic23
Cc: dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel, Atharv Dubey
Hello ,
The helper iio_push_to_buffers_with_timestamp() is deprecated in the IIO
subsystem. The recommended replacement is
iio_push_to_buffers_with_ts().
This patch series updates multiple ADC drivers to use the newer helper
API. No functional changes are intended; the patches only replace the
deprecated calls and adjust arguments where required.
The goal is to remove usage of the deprecated helper and keep the
drivers aligned with the current IIO buffer interface.
Regards,
Atharv
---
Atharv Dubey (11):
iio: ad_sigma_delta: replace deprecated
iio_push_to_buffers_with_timestamp()
iio: ad7766: replace deprecated iio_push_to_buffers_with_timestamp()
iio: adc : ads7950 : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : cc10001 : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : ad7887 : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : hx711 : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : at91 : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : ad799x : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : adc161s626 : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : mt6360 : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : ad7944 : replace deprecated
iio_push_to_buffers_with_timestamp()
drivers/iio/adc/ad7766.c | 4 ++--
drivers/iio/adc/ad7887.c | 4 ++--
drivers/iio/adc/ad7944.c | 10 ++++++----
drivers/iio/adc/ad799x.c | 5 +++--
drivers/iio/adc/ad_sigma_delta.c | 6 +++---
drivers/iio/adc/at91_adc.c | 2 +-
drivers/iio/adc/cc10001_adc.c | 3 ++-
drivers/iio/adc/hx711.c | 5 +++--
drivers/iio/adc/mt6360-adc.c | 2 +-
drivers/iio/adc/ti-adc161s626.c | 5 +++--
drivers/iio/adc/ti-ads7950.c | 2 +-
11 files changed, 27 insertions(+), 21 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp()
2026-03-16 17:27 [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp() Atharv Dubey
@ 2026-03-16 17:27 ` Atharv Dubey
2026-03-16 19:56 ` Andy Shevchenko
2026-03-16 17:27 ` [PATCH 01/11] iio: ad_sigma_delta: " Atharv Dubey
` (8 subsequent siblings)
9 siblings, 1 reply; 15+ messages in thread
From: Atharv Dubey @ 2026-03-16 17:27 UTC (permalink / raw)
To: jic23
Cc: dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel, Atharv Dubey
Hello ,
The helper iio_push_to_buffers_with_timestamp() is deprecated in the IIO
subsystem. The recommended replacement is
iio_push_to_buffers_with_ts().
This patch series updates multiple ADC drivers to use the newer helper
API. No functional changes are intended; the patches only replace the
deprecated calls and adjust arguments where required.
The goal is to remove usage of the deprecated helper and keep the
drivers aligned with the current IIO buffer interface.
Regards,
Atharv
---
Atharv Dubey (11):
iio: ad_sigma_delta: replace deprecated
iio_push_to_buffers_with_timestamp()
iio: ad7766: replace deprecated iio_push_to_buffers_with_timestamp()
iio: adc : ads7950 : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : cc10001 : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : ad7887 : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : hx711 : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : at91 : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : ad799x : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : adc161s626 : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : mt6360 : replace deprecated
iio_push_to_buffers_with_timestamp()
iio: adc : ad7944 : replace deprecated
iio_push_to_buffers_with_timestamp()
drivers/iio/adc/ad7766.c | 4 ++--
drivers/iio/adc/ad7887.c | 4 ++--
drivers/iio/adc/ad7944.c | 10 ++++++----
drivers/iio/adc/ad799x.c | 5 +++--
drivers/iio/adc/ad_sigma_delta.c | 6 +++---
drivers/iio/adc/at91_adc.c | 2 +-
drivers/iio/adc/cc10001_adc.c | 3 ++-
drivers/iio/adc/hx711.c | 5 +++--
drivers/iio/adc/mt6360-adc.c | 2 +-
drivers/iio/adc/ti-adc161s626.c | 5 +++--
drivers/iio/adc/ti-ads7950.c | 2 +-
11 files changed, 27 insertions(+), 21 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 01/11] iio: ad_sigma_delta: replace deprecated iio_push_to_buffers_with_timestamp()
2026-03-16 17:27 [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp() Atharv Dubey
2026-03-16 17:27 ` Atharv Dubey
@ 2026-03-16 17:27 ` Atharv Dubey
2026-03-16 18:19 ` Jonathan Cameron
2026-03-16 17:27 ` [PATCH 02/11] iio: ad7766: " Atharv Dubey
` (7 subsequent siblings)
9 siblings, 1 reply; 15+ messages in thread
From: Atharv Dubey @ 2026-03-16 17:27 UTC (permalink / raw)
To: jic23
Cc: dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel, Atharv Dubey
iio_push_to_buffers_with_timestamp() is deprecated. Replace it with
iio_push_to_buffers_with_ts(), which takes the buffer size as an
argument and helps avoid potential buffer overflows.
Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
---
drivers/iio/adc/ad_sigma_delta.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
index 7852884703b0..73f3069da987 100644
--- a/drivers/iio/adc/ad_sigma_delta.c
+++ b/drivers/iio/adc/ad_sigma_delta.c
@@ -636,7 +636,7 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
* once, there is no need for sample number tracking.
*/
if (sigma_delta->active_slots == 1) {
- iio_push_to_buffers_with_timestamp(indio_dev, data, pf->timestamp);
+ iio_push_to_buffers_with_ts(indio_dev, data, sizeof(data), pf->timestamp);
goto irq_handled;
}
@@ -662,8 +662,8 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
if (sigma_delta->current_slot == sigma_delta->active_slots) {
sigma_delta->current_slot = 0;
- iio_push_to_buffers_with_timestamp(indio_dev, sigma_delta->samples_buf,
- pf->timestamp);
+ iio_push_to_buffers_with_ts(indio_dev, sigma_delta->samples_buf,
+ sizeof(sigma_delta->sampkes_buf), pf->timestamp);
}
irq_handled:
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 02/11] iio: ad7766: replace deprecated iio_push_to_buffers_with_timestamp()
2026-03-16 17:27 [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp() Atharv Dubey
2026-03-16 17:27 ` Atharv Dubey
2026-03-16 17:27 ` [PATCH 01/11] iio: ad_sigma_delta: " Atharv Dubey
@ 2026-03-16 17:27 ` Atharv Dubey
2026-03-16 17:27 ` [PATCH 03/11] iio: adc : ads7950 : " Atharv Dubey
` (6 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Atharv Dubey @ 2026-03-16 17:27 UTC (permalink / raw)
To: jic23
Cc: dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel, Atharv Dubey
iio_push_to_buffers_with_timestamp() is deprecated. Replace it with
iio_push_to_buffers_with_ts(), which takes the buffer size as an
argument and helps avoid potential buffer overflows.
Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
---
drivers/iio/adc/ad7766.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ad7766.c b/drivers/iio/adc/ad7766.c
index 9e4a66477d2d..cc47b0474ceb 100644
--- a/drivers/iio/adc/ad7766.c
+++ b/drivers/iio/adc/ad7766.c
@@ -74,8 +74,8 @@ static irqreturn_t ad7766_trigger_handler(int irq, void *p)
if (ret < 0)
goto done;
- iio_push_to_buffers_with_timestamp(indio_dev, ad7766->data,
- pf->timestamp);
+ iio_push_to_buffers_with_ts(indio_dev, ad7766->data,
+ sizeof(ad7766->data), pf->timestamp);
done:
iio_trigger_notify_done(indio_dev->trig);
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 03/11] iio: adc : ads7950 : replace deprecated iio_push_to_buffers_with_timestamp()
2026-03-16 17:27 [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp() Atharv Dubey
` (2 preceding siblings ...)
2026-03-16 17:27 ` [PATCH 02/11] iio: ad7766: " Atharv Dubey
@ 2026-03-16 17:27 ` Atharv Dubey
2026-03-16 17:27 ` [PATCH 04/11] iio: adc : cc10001 " Atharv Dubey
` (5 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Atharv Dubey @ 2026-03-16 17:27 UTC (permalink / raw)
To: jic23
Cc: dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel, Atharv Dubey
iio_push_to_buffers_with_timestamp() is deprecated. Replace it with
iio_push_to_buffers_with_ts(), which takes the buffer size as an
argument and helps avoid potential buffer overflows.
Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
---
drivers/iio/adc/ti-ads7950.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/ti-ads7950.c b/drivers/iio/adc/ti-ads7950.c
index bbe1ce577789..a3f01ae5783f 100644
--- a/drivers/iio/adc/ti-ads7950.c
+++ b/drivers/iio/adc/ti-ads7950.c
@@ -313,7 +313,7 @@ static irqreturn_t ti_ads7950_trigger_handler(int irq, void *p)
if (ret < 0)
goto out;
- iio_push_to_buffers_with_timestamp(indio_dev, &st->rx_buf[2],
+ iio_push_to_buffers_with_ts(indio_dev, &st->rx_buf[2], sizeof(st->rx_buf)
iio_get_time_ns(indio_dev));
out:
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 04/11] iio: adc : cc10001 : replace deprecated iio_push_to_buffers_with_timestamp()
2026-03-16 17:27 [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp() Atharv Dubey
` (3 preceding siblings ...)
2026-03-16 17:27 ` [PATCH 03/11] iio: adc : ads7950 : " Atharv Dubey
@ 2026-03-16 17:27 ` Atharv Dubey
2026-03-16 17:27 ` [PATCH 05/11] iio: adc : ad7887 " Atharv Dubey
` (4 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Atharv Dubey @ 2026-03-16 17:27 UTC (permalink / raw)
To: jic23
Cc: dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel, Atharv Dubey
iio_push_to_buffers_with_timestamp() is deprecated. Replace it with
iio_push_to_buffers_with_ts(), which takes the buffer size as an
argument and helps avoid potential buffer overflows.
Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
---
drivers/iio/adc/cc10001_adc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/adc/cc10001_adc.c b/drivers/iio/adc/cc10001_adc.c
index 2c51b90b7101..ef105458ffbd 100644
--- a/drivers/iio/adc/cc10001_adc.c
+++ b/drivers/iio/adc/cc10001_adc.c
@@ -178,7 +178,8 @@ static irqreturn_t cc10001_adc_trigger_h(int irq, void *p)
mutex_unlock(&adc_dev->lock);
if (!sample_invalid)
- iio_push_to_buffers_with_timestamp(indio_dev, data,
+ iio_push_to_buffers_with_ts(indio_dev, data,
+ sizeof(data),
iio_get_time_ns(indio_dev));
iio_trigger_notify_done(indio_dev->trig);
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 05/11] iio: adc : ad7887 : replace deprecated iio_push_to_buffers_with_timestamp()
2026-03-16 17:27 [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp() Atharv Dubey
` (4 preceding siblings ...)
2026-03-16 17:27 ` [PATCH 04/11] iio: adc : cc10001 " Atharv Dubey
@ 2026-03-16 17:27 ` Atharv Dubey
2026-03-16 17:27 ` [PATCH 06/11] iio: adc : hx711 " Atharv Dubey
` (3 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Atharv Dubey @ 2026-03-16 17:27 UTC (permalink / raw)
To: jic23
Cc: dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel, Atharv Dubey
iio_push_to_buffers_with_timestamp() is deprecated. Replace it with
iio_push_to_buffers_with_ts(), which takes the buffer size as an
argument and helps avoid potential buffer overflows.
Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
---
drivers/iio/adc/ad7887.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ad7887.c b/drivers/iio/adc/ad7887.c
index 87ff95643794..dfc8b1f71c86 100644
--- a/drivers/iio/adc/ad7887.c
+++ b/drivers/iio/adc/ad7887.c
@@ -119,8 +119,8 @@ static irqreturn_t ad7887_trigger_handler(int irq, void *p)
if (b_sent)
goto done;
- iio_push_to_buffers_with_timestamp(indio_dev, st->data,
- iio_get_time_ns(indio_dev));
+ iio_push_to_buffers_with_ts(indio_dev, st->data,
+ sizeof(st->data), iio_get_time_ns(indio_dev));
done:
iio_trigger_notify_done(indio_dev->trig);
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 06/11] iio: adc : hx711 : replace deprecated iio_push_to_buffers_with_timestamp()
2026-03-16 17:27 [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp() Atharv Dubey
` (5 preceding siblings ...)
2026-03-16 17:27 ` [PATCH 05/11] iio: adc : ad7887 " Atharv Dubey
@ 2026-03-16 17:27 ` Atharv Dubey
2026-03-16 17:27 ` [PATCH 07/11] iio: adc : at91 " Atharv Dubey
` (2 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Atharv Dubey @ 2026-03-16 17:27 UTC (permalink / raw)
To: jic23
Cc: dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel, Atharv Dubey
iio_push_to_buffers_with_timestamp() is deprecated. Replace it with
iio_push_to_buffers_with_ts(), which takes the buffer size as an
argument and helps avoid potential buffer overflows.
Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
---
drivers/iio/adc/hx711.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/hx711.c b/drivers/iio/adc/hx711.c
index 1db8b68a8f64..e3f415b5e2a2 100644
--- a/drivers/iio/adc/hx711.c
+++ b/drivers/iio/adc/hx711.c
@@ -372,8 +372,9 @@ static irqreturn_t hx711_trigger(int irq, void *p)
j++;
}
- iio_push_to_buffers_with_timestamp(indio_dev, &hx711_data->buffer,
- pf->timestamp);
+ iio_push_to_buffers_with_ts(indio_dev, &hx711_data->buffer,
+ sizeof(hx711->buffer),
+ pf->timestamp);
mutex_unlock(&hx711_data->lock);
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 07/11] iio: adc : at91 : replace deprecated iio_push_to_buffers_with_timestamp()
2026-03-16 17:27 [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp() Atharv Dubey
` (6 preceding siblings ...)
2026-03-16 17:27 ` [PATCH 06/11] iio: adc : hx711 " Atharv Dubey
@ 2026-03-16 17:27 ` Atharv Dubey
2026-03-16 17:27 ` [PATCH 08/11] iio: adc : ad799x " Atharv Dubey
2026-03-16 17:27 ` [PATCH 09/11] iio: adc : adc161s626 " Atharv Dubey
9 siblings, 0 replies; 15+ messages in thread
From: Atharv Dubey @ 2026-03-16 17:27 UTC (permalink / raw)
To: jic23
Cc: dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel, Atharv Dubey
iio_push_to_buffers_with_timestamp() is deprecated. Replace it with
iio_push_to_buffers_with_ts(), which takes the buffer size as an
argument and helps avoid potential buffer overflows.
Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
---
drivers/iio/adc/at91_adc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
index 920dd9ffd27a..840dc9000022 100644
--- a/drivers/iio/adc/at91_adc.c
+++ b/drivers/iio/adc/at91_adc.c
@@ -275,7 +275,7 @@ static irqreturn_t at91_adc_trigger_handler(int irq, void *p)
j++;
}
- iio_push_to_buffers_with_timestamp(idev, st->buffer, pf->timestamp);
+ iio_push_to_buffers_with_ts(idev, st->buffer, sizeof(st->buffer), pf->timestamp);
iio_trigger_notify_done(idev->trig);
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 08/11] iio: adc : ad799x : replace deprecated iio_push_to_buffers_with_timestamp()
2026-03-16 17:27 [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp() Atharv Dubey
` (7 preceding siblings ...)
2026-03-16 17:27 ` [PATCH 07/11] iio: adc : at91 " Atharv Dubey
@ 2026-03-16 17:27 ` Atharv Dubey
2026-03-16 17:27 ` [PATCH 09/11] iio: adc : adc161s626 " Atharv Dubey
9 siblings, 0 replies; 15+ messages in thread
From: Atharv Dubey @ 2026-03-16 17:27 UTC (permalink / raw)
To: jic23
Cc: dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel, Atharv Dubey
iio_push_to_buffers_with_timestamp() is deprecated. Replace it with
iio_push_to_buffers_with_ts(), which takes the buffer size as an
argument and helps avoid potential buffer overflows.
Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
---
drivers/iio/adc/ad799x.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ad799x.c b/drivers/iio/adc/ad799x.c
index 108bb22162ef..6c0470037c55 100644
--- a/drivers/iio/adc/ad799x.c
+++ b/drivers/iio/adc/ad799x.c
@@ -221,8 +221,9 @@ static irqreturn_t ad799x_trigger_handler(int irq, void *p)
if (b_sent < 0)
goto out;
- iio_push_to_buffers_with_timestamp(indio_dev, st->rx_buf,
- iio_get_time_ns(indio_dev));
+ iio_push_to_buffers_with_ts(indio_dev, st->rx_buf,
+ sizeof(st->rx_buf),
+ iio_get_time_ns(indio_dev));
out:
iio_trigger_notify_done(indio_dev->trig);
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 09/11] iio: adc : adc161s626 : replace deprecated iio_push_to_buffers_with_timestamp()
2026-03-16 17:27 [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp() Atharv Dubey
` (8 preceding siblings ...)
2026-03-16 17:27 ` [PATCH 08/11] iio: adc : ad799x " Atharv Dubey
@ 2026-03-16 17:27 ` Atharv Dubey
9 siblings, 0 replies; 15+ messages in thread
From: Atharv Dubey @ 2026-03-16 17:27 UTC (permalink / raw)
To: jic23
Cc: dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel, Atharv Dubey
iio_push_to_buffers_with_timestamp() is deprecated. Replace it with
iio_push_to_buffers_with_ts(), which takes the buffer size as an
argument and helps avoid potential buffer overflows.
Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
---
drivers/iio/adc/ti-adc161s626.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ti-adc161s626.c b/drivers/iio/adc/ti-adc161s626.c
index 28aa6b80160c..88f2daa99d66 100644
--- a/drivers/iio/adc/ti-adc161s626.c
+++ b/drivers/iio/adc/ti-adc161s626.c
@@ -119,8 +119,9 @@ static irqreturn_t ti_adc_trigger_handler(int irq, void *private)
ret = ti_adc_read_measurement(data, &indio_dev->channels[0],
(int *) &data->buffer);
if (!ret)
- iio_push_to_buffers_with_timestamp(indio_dev,
- data->buffer,
+ iio_push_to_buffers_with_ts(indio_dev,
+ data->buffer,
+ sizeof(data->buffer),
iio_get_time_ns(indio_dev));
iio_trigger_notify_done(indio_dev->trig);
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 01/11] iio: ad_sigma_delta: replace deprecated iio_push_to_buffers_with_timestamp()
2026-03-16 17:27 ` [PATCH 01/11] iio: ad_sigma_delta: " Atharv Dubey
@ 2026-03-16 18:19 ` Jonathan Cameron
2026-03-19 10:53 ` Atharv Dubey
0 siblings, 1 reply; 15+ messages in thread
From: Jonathan Cameron @ 2026-03-16 18:19 UTC (permalink / raw)
To: Atharv Dubey
Cc: dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel
On Mon, 16 Mar 2026 22:57:27 +0530
Atharv Dubey <atharvd440@gmail.com> wrote:
> iio_push_to_buffers_with_timestamp() is deprecated. Replace it with
> iio_push_to_buffers_with_ts(), which takes the buffer size as an
> argument and helps avoid potential buffer overflows.
>
> Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
Hi Atharv,
Thank for you for your patch.
> ---
> drivers/iio/adc/ad_sigma_delta.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
> index 7852884703b0..73f3069da987 100644
> --- a/drivers/iio/adc/ad_sigma_delta.c
> +++ b/drivers/iio/adc/ad_sigma_delta.c
> @@ -636,7 +636,7 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
> * once, there is no need for sample number tracking.
> */
> if (sigma_delta->active_slots == 1) {
> - iio_push_to_buffers_with_timestamp(indio_dev, data, pf->timestamp);
> + iio_push_to_buffers_with_ts(indio_dev, data, sizeof(data), pf->timestamp);
What is sizeof(data) and why is that the right value to pass as the new parameter?
> goto irq_handled;
> }
>
> @@ -662,8 +662,8 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
>
> if (sigma_delta->current_slot == sigma_delta->active_slots) {
> sigma_delta->current_slot = 0;
> - iio_push_to_buffers_with_timestamp(indio_dev, sigma_delta->samples_buf,
> - pf->timestamp);
> + iio_push_to_buffers_with_ts(indio_dev, sigma_delta->samples_buf,
> + sizeof(sigma_delta->sampkes_buf), pf->timestamp);
Likewise. What value does the new parameter take?
I'm not going to review any more of this version of the series given these are
both incorrect in the first patch.
Jonathan
> }
>
> irq_handled:
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp()
2026-03-16 17:27 ` Atharv Dubey
@ 2026-03-16 19:56 ` Andy Shevchenko
2026-03-19 10:47 ` Atharv Dubey
0 siblings, 1 reply; 15+ messages in thread
From: Andy Shevchenko @ 2026-03-16 19:56 UTC (permalink / raw)
To: Atharv Dubey
Cc: jic23, dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel
On Mon, Mar 16, 2026 at 10:57:26PM +0530, Atharv Dubey wrote:
> Hello ,
>
> The helper iio_push_to_buffers_with_timestamp() is deprecated in the IIO
> subsystem. The recommended replacement is
> iio_push_to_buffers_with_ts().
>
> This patch series updates multiple ADC drivers to use the newer helper
> API. No functional changes are intended; the patches only replace the
> deprecated calls and adjust arguments where required.
>
> The goal is to remove usage of the deprecated helper and keep the
> drivers aligned with the current IIO buffer interface.
You need to do this very carefully.
Besides that your email thread is broken:
- you have sent 2 time cover letter
- the patches 10 and 11 are detached from email thread.
On top of that there is wrong indentation in many places.
I recommend you to choose something less tricky to begin
with.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp()
2026-03-16 19:56 ` Andy Shevchenko
@ 2026-03-19 10:47 ` Atharv Dubey
0 siblings, 0 replies; 15+ messages in thread
From: Atharv Dubey @ 2026-03-19 10:47 UTC (permalink / raw)
To: Andy Shevchenko
Cc: jic23, dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel
Hi Andy,
On 3/17/26 01:26, Andy Shevchenko wrote:
> On Mon, Mar 16, 2026 at 10:57:26PM +0530, Atharv Dubey wrote:
>> Hello ,
>>
>> The helper iio_push_to_buffers_with_timestamp() is deprecated in the IIO
>> subsystem. The recommended replacement is
>> iio_push_to_buffers_with_ts().
>>
>> This patch series updates multiple ADC drivers to use the newer helper
>> API. No functional changes are intended; the patches only replace the
>> deprecated calls and adjust arguments where required.
>>
>> The goal is to remove usage of the deprecated helper and keep the
>> drivers aligned with the current IIO buffer interface.
> You need to do this very carefully.
> Besides that your email thread is broken:
> - you have sent 2 time cover letter
> - the patches 10 and 11 are detached from email thread.
>
> On top of that there is wrong indentation in many places.
> I recommend you to choose something less tricky to begin
> with.
>
>
I'll recitfy these mistakes and perhaps send a smaller patch for the
same. If you have some more simpler things in mind , please let me know.
I'll be happy to help out.
Regards,
Atharv
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 01/11] iio: ad_sigma_delta: replace deprecated iio_push_to_buffers_with_timestamp()
2026-03-16 18:19 ` Jonathan Cameron
@ 2026-03-19 10:53 ` Atharv Dubey
0 siblings, 0 replies; 15+ messages in thread
From: Atharv Dubey @ 2026-03-19 10:53 UTC (permalink / raw)
To: Jonathan Cameron
Cc: dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel
Hi Jonathan,
On 3/16/26 23:49, Jonathan Cameron wrote:
> On Mon, 16 Mar 2026 22:57:27 +0530
> Atharv Dubey <atharvd440@gmail.com> wrote:
>
>> iio_push_to_buffers_with_timestamp() is deprecated. Replace it with
>> iio_push_to_buffers_with_ts(), which takes the buffer size as an
>> argument and helps avoid potential buffer overflows.
>>
>> Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
> Hi Atharv,
>
> Thank for you for your patch.
>
>
>> ---
>> drivers/iio/adc/ad_sigma_delta.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
>> index 7852884703b0..73f3069da987 100644
>> --- a/drivers/iio/adc/ad_sigma_delta.c
>> +++ b/drivers/iio/adc/ad_sigma_delta.c
>> @@ -636,7 +636,7 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
>> * once, there is no need for sample number tracking.
>> */
>> if (sigma_delta->active_slots == 1) {
>> - iio_push_to_buffers_with_timestamp(indio_dev, data, pf->timestamp);
>> + iio_push_to_buffers_with_ts(indio_dev, data, sizeof(data), pf->timestamp);
> What is sizeof(data) and why is that the right value to pass as the new parameter?
>
>> goto irq_handled;
>> }
>>
>> @@ -662,8 +662,8 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
>>
>> if (sigma_delta->current_slot == sigma_delta->active_slots) {
>> sigma_delta->current_slot = 0;
>> - iio_push_to_buffers_with_timestamp(indio_dev, sigma_delta->samples_buf,
>> - pf->timestamp);
>> + iio_push_to_buffers_with_ts(indio_dev, sigma_delta->samples_buf,
>> + sizeof(sigma_delta->sampkes_buf), pf->timestamp);
> Likewise. What value does the new parameter take?
>
> I'm not going to review any more of this version of the series given these are
> both incorrect in the first patch.
>
> Jonathan
You are right, both the fixes are incorrect let me try more on this.
I'll send a smaller patch series first and mark it as an RFC.
>
>> }
>>
>> irq_handled:
>
Regards,
Atharv
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2026-03-19 10:53 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 17:27 [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp() Atharv Dubey
2026-03-16 17:27 ` Atharv Dubey
2026-03-16 19:56 ` Andy Shevchenko
2026-03-19 10:47 ` Atharv Dubey
2026-03-16 17:27 ` [PATCH 01/11] iio: ad_sigma_delta: " Atharv Dubey
2026-03-16 18:19 ` Jonathan Cameron
2026-03-19 10:53 ` Atharv Dubey
2026-03-16 17:27 ` [PATCH 02/11] iio: ad7766: " Atharv Dubey
2026-03-16 17:27 ` [PATCH 03/11] iio: adc : ads7950 : " Atharv Dubey
2026-03-16 17:27 ` [PATCH 04/11] iio: adc : cc10001 " Atharv Dubey
2026-03-16 17:27 ` [PATCH 05/11] iio: adc : ad7887 " Atharv Dubey
2026-03-16 17:27 ` [PATCH 06/11] iio: adc : hx711 " Atharv Dubey
2026-03-16 17:27 ` [PATCH 07/11] iio: adc : at91 " Atharv Dubey
2026-03-16 17:27 ` [PATCH 08/11] iio: adc : ad799x " Atharv Dubey
2026-03-16 17:27 ` [PATCH 09/11] iio: adc : adc161s626 " Atharv Dubey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox