]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
i3c: master: cleanup callback .priv_xfers()
authorFrank Li <Frank.Li@nxp.com>
Wed, 3 Dec 2025 20:45:51 +0000 (15:45 -0500)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 12 Dec 2025 22:59:39 +0000 (23:59 +0100)
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@nxp.com>
Tested-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://patch.msgid.link/20251203-i3c_xfer_cleanup_master-v2-2-7dd94d04ee2d@nxp.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master.c
include/linux/i3c/master.h

index f88f7e19203ae5a90267b2491f3b13b6205863e8..ea45a519dd68a514fd7fe8314b3fcf2c5604aa64 100644 (file)
@@ -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)
index 2fd850f4678b22f352507f8f55910a196536a1e5..58d01ed4cce759cce4b2481630959f2b06d370f7 100644 (file)
@@ -417,12 +417,8 @@ 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.
+ *            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.
@@ -478,10 +474,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);