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

i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers()

Switch to use the new .i3c_xfers() callback, which supports all I3C
transfer modes (SDR and HDR). Also replace struct i3c_priv_xfer with the
new struct i3c_xfer, as i3c_priv_xfer is now an alias of i3c_xfer.

No functional changes.

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-1-7dd94d04ee2d@nxp.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Frank Li and committed by
Alexandre Belloni
eaa08703 79c3ae7a

+19 -19
+4 -4
drivers/i3c/master/adi-i3c-master.c
··· 365 365 return 0; 366 366 } 367 367 368 - static int adi_i3c_master_priv_xfers(struct i3c_dev_desc *dev, 369 - struct i3c_priv_xfer *xfers, 370 - int nxfers) 368 + static int adi_i3c_master_i3c_xfers(struct i3c_dev_desc *dev, 369 + struct i3c_xfer *xfers, 370 + int nxfers, enum i3c_xfer_mode mode) 371 371 { 372 372 struct i3c_master_controller *m = i3c_dev_get_master(dev); 373 373 struct adi_i3c_master *master = to_adi_i3c_master(m); ··· 919 919 .do_daa = adi_i3c_master_do_daa, 920 920 .supports_ccc_cmd = adi_i3c_master_supports_ccc_cmd, 921 921 .send_ccc_cmd = adi_i3c_master_send_ccc_cmd, 922 - .priv_xfers = adi_i3c_master_priv_xfers, 922 + .i3c_xfers = adi_i3c_master_i3c_xfers, 923 923 .i2c_xfers = adi_i3c_master_i2c_xfers, 924 924 .request_ibi = adi_i3c_master_request_ibi, 925 925 .enable_ibi = adi_i3c_master_enable_ibi,
+4 -4
drivers/i3c/master/dw-i3c-master.c
··· 902 902 return ret; 903 903 } 904 904 905 - static int dw_i3c_master_priv_xfers(struct i3c_dev_desc *dev, 906 - struct i3c_priv_xfer *i3c_xfers, 907 - int i3c_nxfers) 905 + static int dw_i3c_master_i3c_xfers(struct i3c_dev_desc *dev, 906 + struct i3c_xfer *i3c_xfers, 907 + int i3c_nxfers, enum i3c_xfer_mode mode) 908 908 { 909 909 struct dw_i3c_i2c_dev_data *data = i3c_dev_get_master_data(dev); 910 910 struct i3c_master_controller *m = i3c_dev_get_master(dev); ··· 1498 1498 .do_daa = dw_i3c_master_daa, 1499 1499 .supports_ccc_cmd = dw_i3c_master_supports_ccc_cmd, 1500 1500 .send_ccc_cmd = dw_i3c_master_send_ccc_cmd, 1501 - .priv_xfers = dw_i3c_master_priv_xfers, 1501 + .i3c_xfers = dw_i3c_master_i3c_xfers, 1502 1502 .attach_i2c_dev = dw_i3c_master_attach_i2c_dev, 1503 1503 .detach_i2c_dev = dw_i3c_master_detach_i2c_dev, 1504 1504 .i2c_xfers = dw_i3c_master_i2c_xfers,
+4 -4
drivers/i3c/master/i3c-master-cdns.c
··· 720 720 return ret; 721 721 } 722 722 723 - static int cdns_i3c_master_priv_xfers(struct i3c_dev_desc *dev, 724 - struct i3c_priv_xfer *xfers, 725 - int nxfers) 723 + static int cdns_i3c_master_i3c_xfers(struct i3c_dev_desc *dev, 724 + struct i3c_xfer *xfers, 725 + int nxfers, enum i3c_xfer_mode mode) 726 726 { 727 727 struct i3c_master_controller *m = i3c_dev_get_master(dev); 728 728 struct cdns_i3c_master *master = to_cdns_i3c_master(m); ··· 1519 1519 .detach_i2c_dev = cdns_i3c_master_detach_i2c_dev, 1520 1520 .supports_ccc_cmd = cdns_i3c_master_supports_ccc_cmd, 1521 1521 .send_ccc_cmd = cdns_i3c_master_send_ccc_cmd, 1522 - .priv_xfers = cdns_i3c_master_priv_xfers, 1522 + .i3c_xfers = cdns_i3c_master_i3c_xfers, 1523 1523 .i2c_xfers = cdns_i3c_master_i2c_xfers, 1524 1524 .enable_ibi = cdns_i3c_master_enable_ibi, 1525 1525 .disable_ibi = cdns_i3c_master_disable_ibi,
+4 -4
drivers/i3c/master/mipi-i3c-hci/core.c
··· 266 266 return hci->cmd->perform_daa(hci); 267 267 } 268 268 269 - static int i3c_hci_priv_xfers(struct i3c_dev_desc *dev, 270 - struct i3c_priv_xfer *i3c_xfers, 271 - int nxfers) 269 + static int i3c_hci_i3c_xfers(struct i3c_dev_desc *dev, 270 + struct i3c_xfer *i3c_xfers, int nxfers, 271 + enum i3c_xfer_mode mode) 272 272 { 273 273 struct i3c_master_controller *m = i3c_dev_get_master(dev); 274 274 struct i3c_hci *hci = to_i3c_hci(m); ··· 515 515 .bus_cleanup = i3c_hci_bus_cleanup, 516 516 .do_daa = i3c_hci_daa, 517 517 .send_ccc_cmd = i3c_hci_send_ccc_cmd, 518 - .priv_xfers = i3c_hci_priv_xfers, 518 + .i3c_xfers = i3c_hci_i3c_xfers, 519 519 .i2c_xfers = i3c_hci_i2c_xfers, 520 520 .attach_i3c_dev = i3c_hci_attach_i3c_dev, 521 521 .reattach_i3c_dev = i3c_hci_reattach_i3c_dev,
+3 -3
drivers/i3c/master/renesas-i3c.c
··· 794 794 return ret; 795 795 } 796 796 797 - static int renesas_i3c_priv_xfers(struct i3c_dev_desc *dev, struct i3c_priv_xfer *i3c_xfers, 798 - int i3c_nxfers) 797 + static int renesas_i3c_i3c_xfers(struct i3c_dev_desc *dev, struct i3c_xfer *i3c_xfers, 798 + int i3c_nxfers, enum i3c_xfer_mode mode) 799 799 { 800 800 struct i3c_master_controller *m = i3c_dev_get_master(dev); 801 801 struct renesas_i3c *i3c = to_renesas_i3c(m); ··· 1282 1282 .do_daa = renesas_i3c_daa, 1283 1283 .supports_ccc_cmd = renesas_i3c_supports_ccc_cmd, 1284 1284 .send_ccc_cmd = renesas_i3c_send_ccc_cmd, 1285 - .priv_xfers = renesas_i3c_priv_xfers, 1285 + .i3c_xfers = renesas_i3c_i3c_xfers, 1286 1286 .attach_i2c_dev = renesas_i3c_attach_i2c_dev, 1287 1287 .detach_i2c_dev = renesas_i3c_detach_i2c_dev, 1288 1288 .i2c_xfers = renesas_i3c_i2c_xfers,