Remove the .priv_xfers() callback from the framework after all master controller drivers have switched to use the new .i3c_xfers() callback.
Unified · Split
| @@ -2819,14 +2819,10 @@ EXPORT_SYMBOL_GPL(i3c_generic_ibi_recycle_slot); · 2818 unmodified lines | ||
| 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 | 2824 | return -EINVAL; |
| 2825 | 2825 | |
| 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 | − | |
| 2830 | 2826 | if (ops->request_ibi && |
| 2831 | 2827 | (!ops->enable_ibi || !ops->disable_ibi || !ops->free_ibi || |
| 2832 | 2828 | !ops->recycle_ibi_slot)) |
| @@ -3031,13 +3027,7 @@ int i3c_dev_do_xfers_locked(struct i3c_dev_desc *dev, struct i3c_xfer *xfers, · 198 unmodified lines | ||
| 3031 | 3027 | if (mode != I3C_SDR && !(master->this->info.hdr_cap & BIT(mode))) |
| 3032 | 3028 | return -EOPNOTSUPP; |
| 3033 | 3029 | |
| 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); | |
| 3041 | 3031 | } |
| 3042 | 3032 | |
| 3043 | 3033 | int i3c_dev_disable_ibi_locked(struct i3c_dev_desc *dev) |
| @@ -417,12 +417,8 @@ struct i3c_bus { · 416 unmodified lines | ||
| 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. |
| @@ -478,10 +474,6 @@ struct i3c_master_controller_ops { · 49 unmodified lines | ||
| 478 | 474 | const struct i3c_ccc_cmd *cmd); |
| 479 | 475 | int (*send_ccc_cmd)(struct i3c_master_controller *master, |
| 480 | 476 | 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); | |
| 485 | 477 | int (*i3c_xfers)(struct i3c_dev_desc *dev, |
| 486 | 478 | struct i3c_xfer *xfers, |
| 487 | 479 | int nxfers, enum i3c_xfer_mode mode); |