Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Frank Li and committed by
Alexandre Belloni
41b80d43 eaa08703

+4 -22
+2 -12
drivers/i3c/master.c
··· 2819 2819 2820 2820 static int i3c_master_check_ops(const struct i3c_master_controller_ops *ops) 2821 2821 { 2822 - if (!ops || !ops->bus_init || 2822 + if (!ops || !ops->bus_init || !ops->i3c_xfers || 2823 2823 !ops->send_ccc_cmd || !ops->do_daa || !ops->i2c_xfers) 2824 - return -EINVAL; 2825 - 2826 - /* Must provide one of priv_xfers (SDR only) or i3c_xfers (all modes) */ 2827 - if (!ops->priv_xfers && !ops->i3c_xfers) 2828 2824 return -EINVAL; 2829 2825 2830 2826 if (ops->request_ibi && ··· 3027 3031 if (mode != I3C_SDR && !(master->this->info.hdr_cap & BIT(mode))) 3028 3032 return -EOPNOTSUPP; 3029 3033 3030 - if (master->ops->i3c_xfers) 3031 - return master->ops->i3c_xfers(dev, xfers, nxfers, mode); 3032 - 3033 - if (mode != I3C_SDR) 3034 - return -EINVAL; 3035 - 3036 - return master->ops->priv_xfers(dev, xfers, nxfers); 3034 + return master->ops->i3c_xfers(dev, xfers, nxfers, mode); 3037 3035 } 3038 3036 3039 3037 int i3c_dev_disable_ibi_locked(struct i3c_dev_desc *dev)
+2 -10
include/linux/i3c/master.h
··· 417 417 * all CCC commands are supported. 418 418 * @send_ccc_cmd: send a CCC command 419 419 * 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. 426 422 * @attach_i2c_dev: called every time an I2C device is attached to the bus. 427 423 * This is a good place to attach master controller specific 428 424 * data to I2C devices. ··· 474 478 const struct i3c_ccc_cmd *cmd); 475 479 int (*send_ccc_cmd)(struct i3c_master_controller *master, 476 480 struct i3c_ccc_cmd *cmd); 477 - /* Deprecated, please use i3c_xfers() */ 478 - int (*priv_xfers)(struct i3c_dev_desc *dev, 479 - struct i3c_priv_xfer *xfers, 480 - int nxfers); 481 481 int (*i3c_xfers)(struct i3c_dev_desc *dev, 482 482 struct i3c_xfer *xfers, 483 483 int nxfers, enum i3c_xfer_mode mode);