* [PATCH] iio: adc: ad4062: Switch from struct i3c_priv_xfer to struct i3c_xfer
@ 2026-01-19 21:36 Jonathan Cameron
2026-01-20 7:19 ` Andy Shevchenko
2026-01-20 23:09 ` Alexandre Belloni
0 siblings, 2 replies; 7+ messages in thread
From: Jonathan Cameron @ 2026-01-19 21:36 UTC (permalink / raw)
To: linux-iio, Andy Shevchenko, Sasha Levin
Cc: David Lechner, Nuno Sá, jorge.marques, Alexandre Belloni,
Frank Li, Jonathan Cameron
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
commit 9904232ae30bc ("i3c: drop i3c_priv_xfer and i3c_device_do_priv_xfers()")
currently in the i3c/for-next tree removes the deprecated
struct i3c_priv_xfer and i3c_device_do_priv_xfers().
Switch to struct i3c_xfer and i3c_device_do_xfers(..., I3C_SDR)
now rather causing a build issue when both trees are merged.
Suggested-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: jorge.marques@analog.com
---
I'm already carrying this on my tree to resolve the issue in next
but feedback still welcome!
---
drivers/iio/adc/ad4062.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/iio/adc/ad4062.c b/drivers/iio/adc/ad4062.c
index a6b3ccc98acf..dd4ad32aa6f5 100644
--- a/drivers/iio/adc/ad4062.c
+++ b/drivers/iio/adc/ad4062.c
@@ -468,13 +468,13 @@ static int ad4062_set_operation_mode(struct ad4062_state *st,
if (mode == AD4062_MONITOR_MODE) {
/* Change address pointer to enter monitor mode */
- struct i3c_priv_xfer xfer_trigger = {
+ struct i3c_xfer xfer_trigger = {
.data.out = &st->conv_addr,
.len = sizeof(st->conv_addr),
.rnw = false,
};
st->conv_addr = AD4062_REG_CONV_TRIGGER_32BITS;
- return i3c_device_do_priv_xfers(st->i3cdev, &xfer_trigger, 1);
+ return i3c_device_do_xfers(st->i3cdev, &xfer_trigger, 1, I3C_SDR);
}
return regmap_write(st->regmap, AD4062_REG_MODE_SET,
@@ -607,18 +607,18 @@ static void ad4062_trigger_work(struct work_struct *work)
* Read current conversion, if at reg CONV_READ, stop bit triggers
* next sample and does not need writing the address.
*/
- struct i3c_priv_xfer xfer_sample = {
+ struct i3c_xfer xfer_sample = {
.data.in = &st->buf.be32,
.len = st->conv_sizeof,
.rnw = true,
};
- struct i3c_priv_xfer xfer_trigger = {
+ struct i3c_xfer xfer_trigger = {
.data.out = &st->conv_addr,
.len = sizeof(st->conv_addr),
.rnw = false,
};
- ret = i3c_device_do_priv_xfers(st->i3cdev, &xfer_sample, 1);
+ ret = i3c_device_do_xfers(st->i3cdev, &xfer_sample, 1, I3C_SDR);
if (ret)
return;
@@ -627,7 +627,7 @@ static void ad4062_trigger_work(struct work_struct *work)
if (st->gpo_irq[1])
return;
- i3c_device_do_priv_xfers(st->i3cdev, &xfer_trigger, 1);
+ i3c_device_do_xfers(st->i3cdev, &xfer_trigger, 1, I3C_SDR);
}
static irqreturn_t ad4062_poll_handler(int irq, void *p)
@@ -852,12 +852,12 @@ static int ad4062_set_chan_calibscale(struct ad4062_state *st, int gain_int,
static int ad4062_read_chan_raw(struct ad4062_state *st, int *val)
{
struct i3c_device *i3cdev = st->i3cdev;
- struct i3c_priv_xfer xfer_trigger = {
+ struct i3c_xfer xfer_trigger = {
.data.out = &st->conv_addr,
.len = sizeof(st->conv_addr),
.rnw = false,
};
- struct i3c_priv_xfer xfer_sample = {
+ struct i3c_xfer xfer_sample = {
.data.in = &st->buf.be32,
.len = sizeof(st->buf.be32),
.rnw = true,
@@ -876,7 +876,7 @@ static int ad4062_read_chan_raw(struct ad4062_state *st, int *val)
reinit_completion(&st->completion);
/* Change address pointer to trigger conversion */
st->conv_addr = AD4062_REG_CONV_TRIGGER_32BITS;
- ret = i3c_device_do_priv_xfers(i3cdev, &xfer_trigger, 1);
+ ret = i3c_device_do_xfers(i3cdev, &xfer_trigger, 1, I3C_SDR);
if (ret)
return ret;
/*
@@ -888,7 +888,7 @@ static int ad4062_read_chan_raw(struct ad4062_state *st, int *val)
if (!ret)
return -ETIMEDOUT;
- ret = i3c_device_do_priv_xfers(i3cdev, &xfer_sample, 1);
+ ret = i3c_device_do_xfers(i3cdev, &xfer_sample, 1, I3C_SDR);
if (ret)
return ret;
*val = be32_to_cpu(st->buf.be32);
@@ -1236,7 +1236,7 @@ static int pm_ad4062_triggered_buffer_postenable(struct ad4062_state *st)
st->conv_sizeof = ad4062_sizeof_storagebits(st);
st->conv_addr = ad4062_get_conv_addr(st, st->conv_sizeof);
/* CONV_READ requires read to trigger first sample. */
- struct i3c_priv_xfer xfer_sample[2] = {
+ struct i3c_xfer xfer_sample[2] = {
{
.data.out = &st->conv_addr,
.len = sizeof(st->conv_addr),
@@ -1249,8 +1249,8 @@ static int pm_ad4062_triggered_buffer_postenable(struct ad4062_state *st)
}
};
- return i3c_device_do_priv_xfers(st->i3cdev, xfer_sample,
- st->gpo_irq[1] ? 2 : 1);
+ return i3c_device_do_xfers(st->i3cdev, xfer_sample,
+ st->gpo_irq[1] ? 2 : 1, I3C_SDR);
}
static int ad4062_triggered_buffer_postenable(struct iio_dev *indio_dev)
--
2.52.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] iio: adc: ad4062: Switch from struct i3c_priv_xfer to struct i3c_xfer
2026-01-19 21:36 [PATCH] iio: adc: ad4062: Switch from struct i3c_priv_xfer to struct i3c_xfer Jonathan Cameron
@ 2026-01-20 7:19 ` Andy Shevchenko
2026-01-20 9:50 ` Jonathan Cameron
2026-01-20 23:09 ` Alexandre Belloni
1 sibling, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2026-01-20 7:19 UTC (permalink / raw)
To: Jonathan Cameron
Cc: linux-iio, Andy Shevchenko, Sasha Levin, David Lechner,
Nuno Sá, jorge.marques, Alexandre Belloni, Frank Li,
Jonathan Cameron
On Mon, Jan 19, 2026 at 09:36:17PM +0000, Jonathan Cameron wrote:
> commit 9904232ae30bc ("i3c: drop i3c_priv_xfer and i3c_device_do_priv_xfers()")
Commit ?
The commit ?
> currently in the i3c/for-next tree removes the deprecated
> struct i3c_priv_xfer and i3c_device_do_priv_xfers().
>
> Switch to struct i3c_xfer and i3c_device_do_xfers(..., I3C_SDR)
> now rather causing a build issue when both trees are merged.
Not sure if we need a Fixes tag.
> Suggested-by: Sasha Levin <sashal@kernel.org>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: jorge.marques@analog.com
Can we move this to be after the '---' cutter line?
> ---
> I'm already carrying this on my tree to resolve the issue in next
> but feedback still welcome!
The rest is fine to me.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] iio: adc: ad4062: Switch from struct i3c_priv_xfer to struct i3c_xfer
2026-01-20 7:19 ` Andy Shevchenko
@ 2026-01-20 9:50 ` Jonathan Cameron
2026-01-20 10:03 ` Andy Shevchenko
0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Cameron @ 2026-01-20 9:50 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Jonathan Cameron, linux-iio, Andy Shevchenko, Sasha Levin,
David Lechner, Nuno Sá, jorge.marques, Alexandre Belloni,
Frank Li
On Tue, 20 Jan 2026 09:19:47 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Mon, Jan 19, 2026 at 09:36:17PM +0000, Jonathan Cameron wrote:
>
> > commit 9904232ae30bc ("i3c: drop i3c_priv_xfer and i3c_device_do_priv_xfers()")
>
> Commit ?
> The commit ?
>
> > currently in the i3c/for-next tree removes the deprecated
> > struct i3c_priv_xfer and i3c_device_do_priv_xfers().
> >
> > Switch to struct i3c_xfer and i3c_device_do_xfers(..., I3C_SDR)
> > now rather causing a build issue when both trees are merged.
>
> Not sure if we need a Fixes tag.
I was lazy. Both this and the original patch will go in together
so low risk, but indeed it should have a fixes tag.
>
> > Suggested-by: Sasha Levin <sashal@kernel.org>
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> > Cc: jorge.marques@analog.com
>
> Can we move this to be after the '---' cutter line?
When I really want someone to review / test I tend to put them above the ---
so that I remember to poke them if they don't and I want them to be
included in any follow on threads.
More FYI type +CC below the line. Mostly I just add them to the send
list however rather than having a Cc at all.
>
> > ---
> > I'm already carrying this on my tree to resolve the issue in next
> > but feedback still welcome!
>
> The rest is fine to me.
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Thanks for the quick response!
J
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] iio: adc: ad4062: Switch from struct i3c_priv_xfer to struct i3c_xfer
2026-01-20 9:50 ` Jonathan Cameron
@ 2026-01-20 10:03 ` Andy Shevchenko
2026-01-20 21:44 ` Jonathan Cameron
0 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2026-01-20 10:03 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Andy Shevchenko, Jonathan Cameron, linux-iio, Andy Shevchenko,
Sasha Levin, David Lechner, Nuno Sá, jorge.marques,
Alexandre Belloni, Frank Li
On Tue, Jan 20, 2026 at 11:50 AM Jonathan Cameron
<jonathan.cameron@huawei.com> wrote:
> On Tue, 20 Jan 2026 09:19:47 +0200
> Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> > On Mon, Jan 19, 2026 at 09:36:17PM +0000, Jonathan Cameron wrote:
...
> > > Cc: jorge.marques@analog.com
> >
> > Can we move this to be after the '---' cutter line?
>
> When I really want someone to review / test I tend to put them above the ---
> so that I remember to poke them if they don't and I want them to be
> included in any follow on threads.
>
> More FYI type +CC below the line. Mostly I just add them to the send
> list however rather than having a Cc at all.
The trick is that you can add
---
Cc: ...
Cc: ...
to the commit message in your local tree. It will be kept and
represented in `git format-patch`.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] iio: adc: ad4062: Switch from struct i3c_priv_xfer to struct i3c_xfer
2026-01-20 10:03 ` Andy Shevchenko
@ 2026-01-20 21:44 ` Jonathan Cameron
2026-01-20 21:54 ` Jonathan Cameron
0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Cameron @ 2026-01-20 21:44 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Jonathan Cameron, Andy Shevchenko, linux-iio, Andy Shevchenko,
Sasha Levin, David Lechner, Nuno Sá, jorge.marques,
Alexandre Belloni, Frank Li
On Tue, 20 Jan 2026 12:03:57 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Tue, Jan 20, 2026 at 11:50 AM Jonathan Cameron
> <jonathan.cameron@huawei.com> wrote:
> > On Tue, 20 Jan 2026 09:19:47 +0200
> > Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> > > On Mon, Jan 19, 2026 at 09:36:17PM +0000, Jonathan Cameron wrote:
>
> ...
>
> > > > Cc: jorge.marques@analog.com
> > >
> > > Can we move this to be after the '---' cutter line?
> >
> > When I really want someone to review / test I tend to put them above the ---
> > so that I remember to poke them if they don't and I want them to be
> > included in any follow on threads.
> >
> > More FYI type +CC below the line. Mostly I just add them to the send
> > list however rather than having a Cc at all.
>
> The trick is that you can add
>
> ---
> Cc: ...
> Cc: ...
>
> to the commit message in your local tree. It will be kept and
> represented in `git format-patch`.
>
I do. This is more pointed because I see it when I use b4 to pick
my own patches up from this list ;)
Anyhow, for one or two I don't think the commit log mess matters
much.
J
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] iio: adc: ad4062: Switch from struct i3c_priv_xfer to struct i3c_xfer
2026-01-20 21:44 ` Jonathan Cameron
@ 2026-01-20 21:54 ` Jonathan Cameron
0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2026-01-20 21:54 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Jonathan Cameron, Andy Shevchenko, linux-iio, Andy Shevchenko,
Sasha Levin, David Lechner, Nuno Sá, jorge.marques,
Alexandre Belloni, Frank Li
On Tue, 20 Jan 2026 21:44:30 +0000
Jonathan Cameron <jic23@kernel.org> wrote:
> On Tue, 20 Jan 2026 12:03:57 +0200
> Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>
> > On Tue, Jan 20, 2026 at 11:50 AM Jonathan Cameron
> > <jonathan.cameron@huawei.com> wrote:
> > > On Tue, 20 Jan 2026 09:19:47 +0200
> > > Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> > > > On Mon, Jan 19, 2026 at 09:36:17PM +0000, Jonathan Cameron wrote:
> >
> > ...
> >
> > > > > Cc: jorge.marques@analog.com
> > > >
> > > > Can we move this to be after the '---' cutter line?
> > >
> > > When I really want someone to review / test I tend to put them above the ---
> > > so that I remember to poke them if they don't and I want them to be
> > > included in any follow on threads.
> > >
> > > More FYI type +CC below the line. Mostly I just add them to the send
> > > list however rather than having a Cc at all.
> >
> > The trick is that you can add
> >
> > ---
> > Cc: ...
> > Cc: ...
> >
> > to the commit message in your local tree. It will be kept and
> > represented in `git format-patch`.
> >
> I do. This is more pointed because I see it when I use b4 to pick
> my own patches up from this list ;)
>
> Anyhow, for one or two I don't think the commit log mess matters
> much.
Doh. What I forgot was that for once, I pushed this directly without
going via the list. Oops. All the stuff under the --- is there.
Cleaned up now.
>
> J
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] iio: adc: ad4062: Switch from struct i3c_priv_xfer to struct i3c_xfer
2026-01-19 21:36 [PATCH] iio: adc: ad4062: Switch from struct i3c_priv_xfer to struct i3c_xfer Jonathan Cameron
2026-01-20 7:19 ` Andy Shevchenko
@ 2026-01-20 23:09 ` Alexandre Belloni
1 sibling, 0 replies; 7+ messages in thread
From: Alexandre Belloni @ 2026-01-20 23:09 UTC (permalink / raw)
To: Jonathan Cameron
Cc: linux-iio, Andy Shevchenko, Sasha Levin, David Lechner,
Nuno Sá, jorge.marques, Frank Li, Jonathan Cameron
On 19/01/2026 21:36:17+0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> commit 9904232ae30bc ("i3c: drop i3c_priv_xfer and i3c_device_do_priv_xfers()")
> currently in the i3c/for-next tree removes the deprecated
> struct i3c_priv_xfer and i3c_device_do_priv_xfers().
>
> Switch to struct i3c_xfer and i3c_device_do_xfers(..., I3C_SDR)
> now rather causing a build issue when both trees are merged.
>
> Suggested-by: Sasha Levin <sashal@kernel.org>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: jorge.marques@analog.com
> ---
> I'm already carrying this on my tree to resolve the issue in next
> but feedback still welcome!
This looks fine to me, I'm sorry this patch is causing you so much
troubles, I was pretty sure every drivers where converted so I took me a
while to understand that this is actually a new driver, I didn't expect
this!
> ---
> drivers/iio/adc/ad4062.c | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/iio/adc/ad4062.c b/drivers/iio/adc/ad4062.c
> index a6b3ccc98acf..dd4ad32aa6f5 100644
> --- a/drivers/iio/adc/ad4062.c
> +++ b/drivers/iio/adc/ad4062.c
> @@ -468,13 +468,13 @@ static int ad4062_set_operation_mode(struct ad4062_state *st,
>
> if (mode == AD4062_MONITOR_MODE) {
> /* Change address pointer to enter monitor mode */
> - struct i3c_priv_xfer xfer_trigger = {
> + struct i3c_xfer xfer_trigger = {
> .data.out = &st->conv_addr,
> .len = sizeof(st->conv_addr),
> .rnw = false,
> };
> st->conv_addr = AD4062_REG_CONV_TRIGGER_32BITS;
> - return i3c_device_do_priv_xfers(st->i3cdev, &xfer_trigger, 1);
> + return i3c_device_do_xfers(st->i3cdev, &xfer_trigger, 1, I3C_SDR);
> }
>
> return regmap_write(st->regmap, AD4062_REG_MODE_SET,
> @@ -607,18 +607,18 @@ static void ad4062_trigger_work(struct work_struct *work)
> * Read current conversion, if at reg CONV_READ, stop bit triggers
> * next sample and does not need writing the address.
> */
> - struct i3c_priv_xfer xfer_sample = {
> + struct i3c_xfer xfer_sample = {
> .data.in = &st->buf.be32,
> .len = st->conv_sizeof,
> .rnw = true,
> };
> - struct i3c_priv_xfer xfer_trigger = {
> + struct i3c_xfer xfer_trigger = {
> .data.out = &st->conv_addr,
> .len = sizeof(st->conv_addr),
> .rnw = false,
> };
>
> - ret = i3c_device_do_priv_xfers(st->i3cdev, &xfer_sample, 1);
> + ret = i3c_device_do_xfers(st->i3cdev, &xfer_sample, 1, I3C_SDR);
> if (ret)
> return;
>
> @@ -627,7 +627,7 @@ static void ad4062_trigger_work(struct work_struct *work)
> if (st->gpo_irq[1])
> return;
>
> - i3c_device_do_priv_xfers(st->i3cdev, &xfer_trigger, 1);
> + i3c_device_do_xfers(st->i3cdev, &xfer_trigger, 1, I3C_SDR);
> }
>
> static irqreturn_t ad4062_poll_handler(int irq, void *p)
> @@ -852,12 +852,12 @@ static int ad4062_set_chan_calibscale(struct ad4062_state *st, int gain_int,
> static int ad4062_read_chan_raw(struct ad4062_state *st, int *val)
> {
> struct i3c_device *i3cdev = st->i3cdev;
> - struct i3c_priv_xfer xfer_trigger = {
> + struct i3c_xfer xfer_trigger = {
> .data.out = &st->conv_addr,
> .len = sizeof(st->conv_addr),
> .rnw = false,
> };
> - struct i3c_priv_xfer xfer_sample = {
> + struct i3c_xfer xfer_sample = {
> .data.in = &st->buf.be32,
> .len = sizeof(st->buf.be32),
> .rnw = true,
> @@ -876,7 +876,7 @@ static int ad4062_read_chan_raw(struct ad4062_state *st, int *val)
> reinit_completion(&st->completion);
> /* Change address pointer to trigger conversion */
> st->conv_addr = AD4062_REG_CONV_TRIGGER_32BITS;
> - ret = i3c_device_do_priv_xfers(i3cdev, &xfer_trigger, 1);
> + ret = i3c_device_do_xfers(i3cdev, &xfer_trigger, 1, I3C_SDR);
> if (ret)
> return ret;
> /*
> @@ -888,7 +888,7 @@ static int ad4062_read_chan_raw(struct ad4062_state *st, int *val)
> if (!ret)
> return -ETIMEDOUT;
>
> - ret = i3c_device_do_priv_xfers(i3cdev, &xfer_sample, 1);
> + ret = i3c_device_do_xfers(i3cdev, &xfer_sample, 1, I3C_SDR);
> if (ret)
> return ret;
> *val = be32_to_cpu(st->buf.be32);
> @@ -1236,7 +1236,7 @@ static int pm_ad4062_triggered_buffer_postenable(struct ad4062_state *st)
> st->conv_sizeof = ad4062_sizeof_storagebits(st);
> st->conv_addr = ad4062_get_conv_addr(st, st->conv_sizeof);
> /* CONV_READ requires read to trigger first sample. */
> - struct i3c_priv_xfer xfer_sample[2] = {
> + struct i3c_xfer xfer_sample[2] = {
> {
> .data.out = &st->conv_addr,
> .len = sizeof(st->conv_addr),
> @@ -1249,8 +1249,8 @@ static int pm_ad4062_triggered_buffer_postenable(struct ad4062_state *st)
> }
> };
>
> - return i3c_device_do_priv_xfers(st->i3cdev, xfer_sample,
> - st->gpo_irq[1] ? 2 : 1);
> + return i3c_device_do_xfers(st->i3cdev, xfer_sample,
> + st->gpo_irq[1] ? 2 : 1, I3C_SDR);
> }
>
> static int ad4062_triggered_buffer_postenable(struct iio_dev *indio_dev)
> --
> 2.52.0
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-01-20 23:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-19 21:36 [PATCH] iio: adc: ad4062: Switch from struct i3c_priv_xfer to struct i3c_xfer Jonathan Cameron
2026-01-20 7:19 ` Andy Shevchenko
2026-01-20 9:50 ` Jonathan Cameron
2026-01-20 10:03 ` Andy Shevchenko
2026-01-20 21:44 ` Jonathan Cameron
2026-01-20 21:54 ` Jonathan Cameron
2026-01-20 23:09 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox