Skip to content

Commit 41b80d4

Browse files
nxpfranklialexandrebelloni
authored andcommitted
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@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>
1 parent eaa0870 commit 41b80d4

2 files changed

Lines changed: 4 additions & 22 deletions

File tree

drivers/i3c/master.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2819,14 +2819,10 @@ EXPORT_SYMBOL_GPL(i3c_generic_ibi_recycle_slot);
28192819

28202820
static int i3c_master_check_ops(const struct i3c_master_controller_ops *ops)
28212821
{
2822-
if (!ops || !ops->bus_init ||
2822+
if (!ops || !ops->bus_init || !ops->i3c_xfers ||
28232823
!ops->send_ccc_cmd || !ops->do_daa || !ops->i2c_xfers)
28242824
return -EINVAL;
28252825

2826-
/* Must provide one of priv_xfers (SDR only) or i3c_xfers (all modes) */
2827-
if (!ops->priv_xfers && !ops->i3c_xfers)
2828-
return -EINVAL;
2829-
28302826
if (ops->request_ibi &&
28312827
(!ops->enable_ibi || !ops->disable_ibi || !ops->free_ibi ||
28322828
!ops->recycle_ibi_slot))
@@ -3031,13 +3027,7 @@ int i3c_dev_do_xfers_locked(struct i3c_dev_desc *dev, struct i3c_xfer *xfers,
30313027
if (mode != I3C_SDR && !(master->this->info.hdr_cap & BIT(mode)))
30323028
return -EOPNOTSUPP;
30333029

3034-
if (master->ops->i3c_xfers)
3035-
return master->ops->i3c_xfers(dev, xfers, nxfers, mode);
3036-
3037-
if (mode != I3C_SDR)
3038-
return -EINVAL;
3039-
3040-
return master->ops->priv_xfers(dev, xfers, nxfers);
3030+
return master->ops->i3c_xfers(dev, xfers, nxfers, mode);
30413031
}
30423032

30433033
int i3c_dev_disable_ibi_locked(struct i3c_dev_desc *dev)

include/linux/i3c/master.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -417,12 +417,8 @@ struct i3c_bus {
417417
* all CCC commands are supported.
418418
* @send_ccc_cmd: send a CCC command
419419
* This method is mandatory.
420-
* @priv_xfers: do one or several private I3C SDR transfers
421-
* This method is mandatory when i3c_xfers is not implemented. It
422-
* is deprecated.
423-
* @i3c_xfers: do one or several I3C SDR or HDR transfers
424-
* This method is mandatory when priv_xfers is not implemented but
425-
* should be implemented instead of priv_xfers.
420+
* @i3c_xfers: do one or several I3C SDR or HDR transfers.
421+
* This method is mandatory.
426422
* @attach_i2c_dev: called every time an I2C device is attached to the bus.
427423
* This is a good place to attach master controller specific
428424
* data to I2C devices.
@@ -478,10 +474,6 @@ struct i3c_master_controller_ops {
478474
const struct i3c_ccc_cmd *cmd);
479475
int (*send_ccc_cmd)(struct i3c_master_controller *master,
480476
struct i3c_ccc_cmd *cmd);
481-
/* Deprecated, please use i3c_xfers() */
482-
int (*priv_xfers)(struct i3c_dev_desc *dev,
483-
struct i3c_priv_xfer *xfers,
484-
int nxfers);
485477
int (*i3c_xfers)(struct i3c_dev_desc *dev,
486478
struct i3c_xfer *xfers,
487479
int nxfers, enum i3c_xfer_mode mode);

0 commit comments

Comments
 (0)