History

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.

Frank Li committed 11 months ago

Commit 41b80d41 parent eaa08702 files · +4 −22Browse files

Unified · Split

2 files
  1. drivers/i3c/master.c +2 −12
  2. include/linux/i3c/master.h +2 −10
drivers/i3c/master.c+2−12
@@ -2819,14 +2819,10 @@ EXPORT_SYMBOL_GPL(i3c_generic_ibi_recycle_slot); · 2818 unmodified lines
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, · 198 unmodified lines
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+2−10
@@ -417,12 +417,8 @@ struct i3c_bus { · 416 unmodified lines
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 { · 49 unmodified lines
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);