From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, "Andy Shevchenko" <andy@kernel.org>,
"Sasha Levin" <sashal@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
jorge.marques@analog.com, "Frank Li" <Frank.Li@nxp.com>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH] iio: adc: ad4062: Switch from struct i3c_priv_xfer to struct i3c_xfer
Date: Wed, 21 Jan 2026 00:09:35 +0100 [thread overview]
Message-ID: <202601202309350bdc5dd6@mail.local> (raw)
In-Reply-To: <20260119213617.745603-1-jic23@kernel.org>
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
prev parent reply other threads:[~2026-01-20 23:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202601202309350bdc5dd6@mail.local \
--to=alexandre.belloni@bootlin.com \
--cc=Frank.Li@nxp.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=jorge.marques@analog.com \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=sashal@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox