[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20251027-i3c_xfer_cleanup_master-v1-2-e9bfcb083a38@nxp.com>
Date: Mon, 27 Oct 2025 16:57:40 -0400
From: Frank Li <Frank.Li@....com>
To: Jorge Marques <jorge.marques@...log.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Przemysław Gaj <pgaj@...ence.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Tommaso Merciai <tommaso.merciai.xr@...renesas.com>
Cc: linux-i3c@...ts.infradead.org, linux-kernel@...r.kernel.org,
Frank Li <Frank.Li@....com>
Subject: [PATCH 2/2] i3c: master: cleanup callback .priv_xfers()
Remove the .priv_xfers() callback from the framework after all master
controller drivers have switched to use the new .i3c_xfers() callback.
Signed-off-by: Frank Li <Frank.Li@....com>
---
drivers/i3c/master.c | 17 ++---------------
include/linux/i3c/master.h | 6 ------
2 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 16a480865ff4a28857f1ea6df33dbe4a66d1468c..ad9714247161121a7de2c97ecf8302e58f6e7957 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -2821,14 +2821,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))
@@ -3033,16 +3029,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 (!master->ops->priv_xfers)
- return -EOPNOTSUPP;
-
- 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 7e22f9d2a2ca3f4ab808db50f809efd192c795cd..028696abd61abc4bde73a04a1f291db874f2292c 100644
--- a/include/linux/i3c/master.h
+++ b/include/linux/i3c/master.h
@@ -417,8 +417,6 @@ 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.
* @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.
@@ -474,10 +472,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);
- /* Depreciated, 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_priv_xfer *xfers,
int nxfers, enum i3c_xfer_mode mode);
--
2.34.1
Powered by blists - more mailing lists