From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
To: Frank Li <Frank.Li@nxp.com>
Cc: "Jorge Marques" <jorge.marques@analog.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Przemysław Gaj" <pgaj@cadence.com>,
"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org,
imx@lists.linux.dev
Subject: Re: [PATCH v2 2/2] i3c: master: cleanup callback .priv_xfers()
Date: Thu, 4 Dec 2025 10:58:20 +0100 [thread overview]
Message-ID: <aTFbPE1KHWVeZYi2@tom-desktop> (raw)
In-Reply-To: <20251203-i3c_xfer_cleanup_master-v2-2-7dd94d04ee2d@nxp.com>
On Wed, Dec 03, 2025 at 03:45:51PM -0500, Frank Li wrote:
> Remove the .priv_xfers() callback from the framework after all master
> controller drivers have switched to use the new .i3c_xfers() callback.
>
Tested-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> drivers/i3c/master.c | 14 ++------------
> include/linux/i3c/master.h | 11 +----------
> 2 files changed, 3 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index f88f7e19203ae5a90267b2491f3b13b6205863e8..ea45a519dd68a514fd7fe8314b3fcf2c5604aa64 100644
> --- a/drivers/i3c/master.c
> +++ b/drivers/i3c/master.c
> @@ -2819,14 +2819,10 @@ EXPORT_SYMBOL_GPL(i3c_generic_ibi_recycle_slot);
>
> static int i3c_master_check_ops(const struct i3c_master_controller_ops *ops)
> {
> - if (!ops || !ops->bus_init ||
> + if (!ops || !ops->bus_init || !ops->i3c_xfers ||
> !ops->send_ccc_cmd || !ops->do_daa || !ops->i2c_xfers)
> return -EINVAL;
>
> - /* Must provide one of priv_xfers (SDR only) or i3c_xfers (all modes) */
> - if (!ops->priv_xfers && !ops->i3c_xfers)
> - return -EINVAL;
> -
> if (ops->request_ibi &&
> (!ops->enable_ibi || !ops->disable_ibi || !ops->free_ibi ||
> !ops->recycle_ibi_slot))
> @@ -3031,13 +3027,7 @@ int i3c_dev_do_xfers_locked(struct i3c_dev_desc *dev, struct i3c_xfer *xfers,
> if (mode != I3C_SDR && !(master->this->info.hdr_cap & BIT(mode)))
> return -EOPNOTSUPP;
>
> - if (master->ops->i3c_xfers)
> - return master->ops->i3c_xfers(dev, xfers, nxfers, mode);
> -
> - if (mode != I3C_SDR)
> - return -EINVAL;
> -
> - return master->ops->priv_xfers(dev, xfers, nxfers);
> + return master->ops->i3c_xfers(dev, xfers, nxfers, mode);
> }
>
> int i3c_dev_disable_ibi_locked(struct i3c_dev_desc *dev)
> diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h
> index 2fd850f4678b22f352507f8f55910a196536a1e5..6225ad28f210fa15a8f2d521a565ef06995e2470 100644
> --- a/include/linux/i3c/master.h
> +++ b/include/linux/i3c/master.h
> @@ -417,12 +417,7 @@ struct i3c_bus {
> * all CCC commands are supported.
> * @send_ccc_cmd: send a CCC command
> * This method is mandatory.
> - * @priv_xfers: do one or several private I3C SDR transfers
> - * This method is mandatory when i3c_xfers is not implemented. It
> - * is deprecated.
> - * @i3c_xfers: do one or several I3C SDR or HDR transfers
> - * This method is mandatory when priv_xfers is not implemented but
> - * should be implemented instead of priv_xfers.
> + * @i3c_xfers: do one or several I3C SDR or HDR transfers.
> * @attach_i2c_dev: called every time an I2C device is attached to the bus.
> * This is a good place to attach master controller specific
> * data to I2C devices.
> @@ -478,10 +473,6 @@ struct i3c_master_controller_ops {
> const struct i3c_ccc_cmd *cmd);
> int (*send_ccc_cmd)(struct i3c_master_controller *master,
> struct i3c_ccc_cmd *cmd);
> - /* Deprecated, please use i3c_xfers() */
> - int (*priv_xfers)(struct i3c_dev_desc *dev,
> - struct i3c_priv_xfer *xfers,
> - int nxfers);
> int (*i3c_xfers)(struct i3c_dev_desc *dev,
> struct i3c_xfer *xfers,
> int nxfers, enum i3c_xfer_mode mode);
>
> --
> 2.34.1
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
To: Frank Li <Frank.Li@nxp.com>
Cc: "Jorge Marques" <jorge.marques@analog.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Przemysław Gaj" <pgaj@cadence.com>,
"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org,
imx@lists.linux.dev
Subject: Re: [PATCH v2 2/2] i3c: master: cleanup callback .priv_xfers()
Date: Thu, 4 Dec 2025 10:58:20 +0100 [thread overview]
Message-ID: <aTFbPE1KHWVeZYi2@tom-desktop> (raw)
In-Reply-To: <20251203-i3c_xfer_cleanup_master-v2-2-7dd94d04ee2d@nxp.com>
On Wed, Dec 03, 2025 at 03:45:51PM -0500, Frank Li wrote:
> Remove the .priv_xfers() callback from the framework after all master
> controller drivers have switched to use the new .i3c_xfers() callback.
>
Tested-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> drivers/i3c/master.c | 14 ++------------
> include/linux/i3c/master.h | 11 +----------
> 2 files changed, 3 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index f88f7e19203ae5a90267b2491f3b13b6205863e8..ea45a519dd68a514fd7fe8314b3fcf2c5604aa64 100644
> --- a/drivers/i3c/master.c
> +++ b/drivers/i3c/master.c
> @@ -2819,14 +2819,10 @@ EXPORT_SYMBOL_GPL(i3c_generic_ibi_recycle_slot);
>
> static int i3c_master_check_ops(const struct i3c_master_controller_ops *ops)
> {
> - if (!ops || !ops->bus_init ||
> + if (!ops || !ops->bus_init || !ops->i3c_xfers ||
> !ops->send_ccc_cmd || !ops->do_daa || !ops->i2c_xfers)
> return -EINVAL;
>
> - /* Must provide one of priv_xfers (SDR only) or i3c_xfers (all modes) */
> - if (!ops->priv_xfers && !ops->i3c_xfers)
> - return -EINVAL;
> -
> if (ops->request_ibi &&
> (!ops->enable_ibi || !ops->disable_ibi || !ops->free_ibi ||
> !ops->recycle_ibi_slot))
> @@ -3031,13 +3027,7 @@ int i3c_dev_do_xfers_locked(struct i3c_dev_desc *dev, struct i3c_xfer *xfers,
> if (mode != I3C_SDR && !(master->this->info.hdr_cap & BIT(mode)))
> return -EOPNOTSUPP;
>
> - if (master->ops->i3c_xfers)
> - return master->ops->i3c_xfers(dev, xfers, nxfers, mode);
> -
> - if (mode != I3C_SDR)
> - return -EINVAL;
> -
> - return master->ops->priv_xfers(dev, xfers, nxfers);
> + return master->ops->i3c_xfers(dev, xfers, nxfers, mode);
> }
>
> int i3c_dev_disable_ibi_locked(struct i3c_dev_desc *dev)
> diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h
> index 2fd850f4678b22f352507f8f55910a196536a1e5..6225ad28f210fa15a8f2d521a565ef06995e2470 100644
> --- a/include/linux/i3c/master.h
> +++ b/include/linux/i3c/master.h
> @@ -417,12 +417,7 @@ struct i3c_bus {
> * all CCC commands are supported.
> * @send_ccc_cmd: send a CCC command
> * This method is mandatory.
> - * @priv_xfers: do one or several private I3C SDR transfers
> - * This method is mandatory when i3c_xfers is not implemented. It
> - * is deprecated.
> - * @i3c_xfers: do one or several I3C SDR or HDR transfers
> - * This method is mandatory when priv_xfers is not implemented but
> - * should be implemented instead of priv_xfers.
> + * @i3c_xfers: do one or several I3C SDR or HDR transfers.
> * @attach_i2c_dev: called every time an I2C device is attached to the bus.
> * This is a good place to attach master controller specific
> * data to I2C devices.
> @@ -478,10 +473,6 @@ struct i3c_master_controller_ops {
> const struct i3c_ccc_cmd *cmd);
> int (*send_ccc_cmd)(struct i3c_master_controller *master,
> struct i3c_ccc_cmd *cmd);
> - /* Deprecated, please use i3c_xfers() */
> - int (*priv_xfers)(struct i3c_dev_desc *dev,
> - struct i3c_priv_xfer *xfers,
> - int nxfers);
> int (*i3c_xfers)(struct i3c_dev_desc *dev,
> struct i3c_xfer *xfers,
> int nxfers, enum i3c_xfer_mode mode);
>
> --
> 2.34.1
>
>
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
next prev parent reply other threads:[~2025-12-04 9:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-03 20:45 [PATCH v2 0/2] i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers() Frank Li
2025-12-03 20:45 ` Frank Li
2025-12-03 20:45 ` [PATCH v2 1/2] " Frank Li
2025-12-03 20:45 ` Frank Li
2025-12-04 9:57 ` Tommaso Merciai
2025-12-04 9:57 ` Tommaso Merciai
2025-12-03 20:45 ` [PATCH v2 2/2] i3c: master: cleanup callback .priv_xfers() Frank Li
2025-12-03 20:45 ` Frank Li
2025-12-04 9:58 ` Tommaso Merciai [this message]
2025-12-04 9:58 ` Tommaso Merciai
2025-12-12 23:07 ` [PATCH v2 0/2] i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers() Alexandre Belloni
2025-12-12 23:07 ` Alexandre Belloni
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=aTFbPE1KHWVeZYi2@tom-desktop \
--to=tommaso.merciai.xr@bp.renesas.com \
--cc=Frank.Li@nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=imx@lists.linux.dev \
--cc=jorge.marques@analog.com \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pgaj@cadence.com \
--cc=wsa+renesas@sang-engineering.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.