* [PATCH v2 0/2] i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers()
@ 2025-12-03 20:45 Frank Li
2025-12-03 20:45 ` [PATCH v2 1/2] " Frank Li
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Frank Li @ 2025-12-03 20:45 UTC (permalink / raw)
To: Jorge Marques, Alexandre Belloni, Przemysław Gaj,
Wolfram Sang, Tommaso Merciai
Cc: linux-i3c, linux-kernel, imx, Frank Li
switch all controller driver use new callback .i3c_xfers() from
.priv_xfers() and remove .priv_xfers() in framework.
This serise is base on
https://lore.kernel.org/linux-i3c/20251027-i3c_ddr-v7-0-866a0ff7fc46@nxp.com/T/#t
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Changes in v2:
- rebase to linux-i3c/next
- Link to v1: https://lore.kernel.org/r/20251027-i3c_xfer_cleanup_master-v1-0-e9bfcb083a38@nxp.com
---
Frank Li (2):
i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers()
i3c: master: cleanup callback .priv_xfers()
drivers/i3c/master.c | 14 ++------------
drivers/i3c/master/adi-i3c-master.c | 8 ++++----
drivers/i3c/master/dw-i3c-master.c | 8 ++++----
drivers/i3c/master/i3c-master-cdns.c | 8 ++++----
drivers/i3c/master/mipi-i3c-hci/core.c | 8 ++++----
drivers/i3c/master/renesas-i3c.c | 6 +++---
include/linux/i3c/master.h | 11 +----------
7 files changed, 22 insertions(+), 41 deletions(-)
---
base-commit: 79c3ae7ada0548d5097bdb65dde5d24a7d660fae
change-id: 20251027-i3c_xfer_cleanup_master-cf75a712dc7c
Best regards,
--
Frank Li <Frank.Li@nxp.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH v2 1/2] i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers() 2025-12-03 20:45 [PATCH v2 0/2] i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers() Frank Li @ 2025-12-03 20:45 ` Frank Li 2025-12-04 9:57 ` Tommaso Merciai 2025-12-03 20:45 ` [PATCH v2 2/2] i3c: master: cleanup callback .priv_xfers() Frank Li 2025-12-12 23:07 ` [PATCH v2 0/2] i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers() Alexandre Belloni 2 siblings, 1 reply; 6+ messages in thread From: Frank Li @ 2025-12-03 20:45 UTC (permalink / raw) To: Jorge Marques, Alexandre Belloni, Przemysław Gaj, Wolfram Sang, Tommaso Merciai Cc: linux-i3c, linux-kernel, imx, Frank Li 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> --- drivers/i3c/master/adi-i3c-master.c | 8 ++++---- drivers/i3c/master/dw-i3c-master.c | 8 ++++---- drivers/i3c/master/i3c-master-cdns.c | 8 ++++---- drivers/i3c/master/mipi-i3c-hci/core.c | 8 ++++---- drivers/i3c/master/renesas-i3c.c | 6 +++--- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/i3c/master/adi-i3c-master.c b/drivers/i3c/master/adi-i3c-master.c index 82ac0b3d057abddc78671ce973db12f528984ea1..00eb80e492afc736046f04fa454be16bb718004a 100644 --- a/drivers/i3c/master/adi-i3c-master.c +++ b/drivers/i3c/master/adi-i3c-master.c @@ -365,9 +365,9 @@ static int adi_i3c_master_send_ccc_cmd(struct i3c_master_controller *m, return 0; } -static int adi_i3c_master_priv_xfers(struct i3c_dev_desc *dev, - struct i3c_priv_xfer *xfers, - int nxfers) +static int adi_i3c_master_i3c_xfers(struct i3c_dev_desc *dev, + struct i3c_xfer *xfers, + int nxfers, enum i3c_xfer_mode mode) { struct i3c_master_controller *m = i3c_dev_get_master(dev); struct adi_i3c_master *master = to_adi_i3c_master(m); @@ -919,7 +919,7 @@ static const struct i3c_master_controller_ops adi_i3c_master_ops = { .do_daa = adi_i3c_master_do_daa, .supports_ccc_cmd = adi_i3c_master_supports_ccc_cmd, .send_ccc_cmd = adi_i3c_master_send_ccc_cmd, - .priv_xfers = adi_i3c_master_priv_xfers, + .i3c_xfers = adi_i3c_master_i3c_xfers, .i2c_xfers = adi_i3c_master_i2c_xfers, .request_ibi = adi_i3c_master_request_ibi, .enable_ibi = adi_i3c_master_enable_ibi, diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c index 276592a8222e7b098a2323e0f3f587e77fc789bd..889e2ed5bc830310c5555eeeab08674d0c579a0e 100644 --- a/drivers/i3c/master/dw-i3c-master.c +++ b/drivers/i3c/master/dw-i3c-master.c @@ -902,9 +902,9 @@ static int dw_i3c_master_daa(struct i3c_master_controller *m) return ret; } -static int dw_i3c_master_priv_xfers(struct i3c_dev_desc *dev, - struct i3c_priv_xfer *i3c_xfers, - int i3c_nxfers) +static int dw_i3c_master_i3c_xfers(struct i3c_dev_desc *dev, + struct i3c_xfer *i3c_xfers, + int i3c_nxfers, enum i3c_xfer_mode mode) { struct dw_i3c_i2c_dev_data *data = i3c_dev_get_master_data(dev); struct i3c_master_controller *m = i3c_dev_get_master(dev); @@ -1498,7 +1498,7 @@ static const struct i3c_master_controller_ops dw_mipi_i3c_ops = { .do_daa = dw_i3c_master_daa, .supports_ccc_cmd = dw_i3c_master_supports_ccc_cmd, .send_ccc_cmd = dw_i3c_master_send_ccc_cmd, - .priv_xfers = dw_i3c_master_priv_xfers, + .i3c_xfers = dw_i3c_master_i3c_xfers, .attach_i2c_dev = dw_i3c_master_attach_i2c_dev, .detach_i2c_dev = dw_i3c_master_detach_i2c_dev, .i2c_xfers = dw_i3c_master_i2c_xfers, diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c index 97b151564d3d31092975cec14958a17ddcd91d13..8eb76b8ca2b00a46a65f3a6dc7416d8af7ca288d 100644 --- a/drivers/i3c/master/i3c-master-cdns.c +++ b/drivers/i3c/master/i3c-master-cdns.c @@ -720,9 +720,9 @@ static int cdns_i3c_master_send_ccc_cmd(struct i3c_master_controller *m, return ret; } -static int cdns_i3c_master_priv_xfers(struct i3c_dev_desc *dev, - struct i3c_priv_xfer *xfers, - int nxfers) +static int cdns_i3c_master_i3c_xfers(struct i3c_dev_desc *dev, + struct i3c_xfer *xfers, + int nxfers, enum i3c_xfer_mode mode) { struct i3c_master_controller *m = i3c_dev_get_master(dev); struct cdns_i3c_master *master = to_cdns_i3c_master(m); @@ -1519,7 +1519,7 @@ static const struct i3c_master_controller_ops cdns_i3c_master_ops = { .detach_i2c_dev = cdns_i3c_master_detach_i2c_dev, .supports_ccc_cmd = cdns_i3c_master_supports_ccc_cmd, .send_ccc_cmd = cdns_i3c_master_send_ccc_cmd, - .priv_xfers = cdns_i3c_master_priv_xfers, + .i3c_xfers = cdns_i3c_master_i3c_xfers, .i2c_xfers = cdns_i3c_master_i2c_xfers, .enable_ibi = cdns_i3c_master_enable_ibi, .disable_ibi = cdns_i3c_master_disable_ibi, diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c index 47e42cb4dbe71edc5a022f4cb0fdf33a281eb4a7..607d77ab0e54691705845c33a79939820a83c9f0 100644 --- a/drivers/i3c/master/mipi-i3c-hci/core.c +++ b/drivers/i3c/master/mipi-i3c-hci/core.c @@ -266,9 +266,9 @@ static int i3c_hci_daa(struct i3c_master_controller *m) return hci->cmd->perform_daa(hci); } -static int i3c_hci_priv_xfers(struct i3c_dev_desc *dev, - struct i3c_priv_xfer *i3c_xfers, - int nxfers) +static int i3c_hci_i3c_xfers(struct i3c_dev_desc *dev, + struct i3c_xfer *i3c_xfers, int nxfers, + enum i3c_xfer_mode mode) { struct i3c_master_controller *m = i3c_dev_get_master(dev); struct i3c_hci *hci = to_i3c_hci(m); @@ -515,7 +515,7 @@ static const struct i3c_master_controller_ops i3c_hci_ops = { .bus_cleanup = i3c_hci_bus_cleanup, .do_daa = i3c_hci_daa, .send_ccc_cmd = i3c_hci_send_ccc_cmd, - .priv_xfers = i3c_hci_priv_xfers, + .i3c_xfers = i3c_hci_i3c_xfers, .i2c_xfers = i3c_hci_i2c_xfers, .attach_i3c_dev = i3c_hci_attach_i3c_dev, .reattach_i3c_dev = i3c_hci_reattach_i3c_dev, diff --git a/drivers/i3c/master/renesas-i3c.c b/drivers/i3c/master/renesas-i3c.c index 275f7b9242886ee77a647149a808e2f184fb0447..426a418f29b61256fbbfc50cf578bf04629ec391 100644 --- a/drivers/i3c/master/renesas-i3c.c +++ b/drivers/i3c/master/renesas-i3c.c @@ -794,8 +794,8 @@ static int renesas_i3c_send_ccc_cmd(struct i3c_master_controller *m, return ret; } -static int renesas_i3c_priv_xfers(struct i3c_dev_desc *dev, struct i3c_priv_xfer *i3c_xfers, - int i3c_nxfers) +static int renesas_i3c_i3c_xfers(struct i3c_dev_desc *dev, struct i3c_xfer *i3c_xfers, + int i3c_nxfers, enum i3c_xfer_mode mode) { struct i3c_master_controller *m = i3c_dev_get_master(dev); struct renesas_i3c *i3c = to_renesas_i3c(m); @@ -1282,7 +1282,7 @@ static const struct i3c_master_controller_ops renesas_i3c_ops = { .do_daa = renesas_i3c_daa, .supports_ccc_cmd = renesas_i3c_supports_ccc_cmd, .send_ccc_cmd = renesas_i3c_send_ccc_cmd, - .priv_xfers = renesas_i3c_priv_xfers, + .i3c_xfers = renesas_i3c_i3c_xfers, .attach_i2c_dev = renesas_i3c_attach_i2c_dev, .detach_i2c_dev = renesas_i3c_detach_i2c_dev, .i2c_xfers = renesas_i3c_i2c_xfers, -- 2.34.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers() 2025-12-03 20:45 ` [PATCH v2 1/2] " Frank Li @ 2025-12-04 9:57 ` Tommaso Merciai 0 siblings, 0 replies; 6+ messages in thread From: Tommaso Merciai @ 2025-12-04 9:57 UTC (permalink / raw) To: Frank Li Cc: Jorge Marques, Alexandre Belloni, Przemysław Gaj, Wolfram Sang, linux-i3c, linux-kernel, imx Hi Frank, Thanks for your patch. On Wed, Dec 03, 2025 at 03:45:50PM -0500, Frank Li wrote: > 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> > --- > drivers/i3c/master/adi-i3c-master.c | 8 ++++---- > drivers/i3c/master/dw-i3c-master.c | 8 ++++---- > drivers/i3c/master/i3c-master-cdns.c | 8 ++++---- > drivers/i3c/master/mipi-i3c-hci/core.c | 8 ++++---- > drivers/i3c/master/renesas-i3c.c | 6 +++--- Tested-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Kind Regards, Tommaso > 5 files changed, 19 insertions(+), 19 deletions(-) > > diff --git a/drivers/i3c/master/adi-i3c-master.c b/drivers/i3c/master/adi-i3c-master.c > index 82ac0b3d057abddc78671ce973db12f528984ea1..00eb80e492afc736046f04fa454be16bb718004a 100644 > --- a/drivers/i3c/master/adi-i3c-master.c > +++ b/drivers/i3c/master/adi-i3c-master.c > @@ -365,9 +365,9 @@ static int adi_i3c_master_send_ccc_cmd(struct i3c_master_controller *m, > return 0; > } > > -static int adi_i3c_master_priv_xfers(struct i3c_dev_desc *dev, > - struct i3c_priv_xfer *xfers, > - int nxfers) > +static int adi_i3c_master_i3c_xfers(struct i3c_dev_desc *dev, > + struct i3c_xfer *xfers, > + int nxfers, enum i3c_xfer_mode mode) > { > struct i3c_master_controller *m = i3c_dev_get_master(dev); > struct adi_i3c_master *master = to_adi_i3c_master(m); > @@ -919,7 +919,7 @@ static const struct i3c_master_controller_ops adi_i3c_master_ops = { > .do_daa = adi_i3c_master_do_daa, > .supports_ccc_cmd = adi_i3c_master_supports_ccc_cmd, > .send_ccc_cmd = adi_i3c_master_send_ccc_cmd, > - .priv_xfers = adi_i3c_master_priv_xfers, > + .i3c_xfers = adi_i3c_master_i3c_xfers, > .i2c_xfers = adi_i3c_master_i2c_xfers, > .request_ibi = adi_i3c_master_request_ibi, > .enable_ibi = adi_i3c_master_enable_ibi, > diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c > index 276592a8222e7b098a2323e0f3f587e77fc789bd..889e2ed5bc830310c5555eeeab08674d0c579a0e 100644 > --- a/drivers/i3c/master/dw-i3c-master.c > +++ b/drivers/i3c/master/dw-i3c-master.c > @@ -902,9 +902,9 @@ static int dw_i3c_master_daa(struct i3c_master_controller *m) > return ret; > } > > -static int dw_i3c_master_priv_xfers(struct i3c_dev_desc *dev, > - struct i3c_priv_xfer *i3c_xfers, > - int i3c_nxfers) > +static int dw_i3c_master_i3c_xfers(struct i3c_dev_desc *dev, > + struct i3c_xfer *i3c_xfers, > + int i3c_nxfers, enum i3c_xfer_mode mode) > { > struct dw_i3c_i2c_dev_data *data = i3c_dev_get_master_data(dev); > struct i3c_master_controller *m = i3c_dev_get_master(dev); > @@ -1498,7 +1498,7 @@ static const struct i3c_master_controller_ops dw_mipi_i3c_ops = { > .do_daa = dw_i3c_master_daa, > .supports_ccc_cmd = dw_i3c_master_supports_ccc_cmd, > .send_ccc_cmd = dw_i3c_master_send_ccc_cmd, > - .priv_xfers = dw_i3c_master_priv_xfers, > + .i3c_xfers = dw_i3c_master_i3c_xfers, > .attach_i2c_dev = dw_i3c_master_attach_i2c_dev, > .detach_i2c_dev = dw_i3c_master_detach_i2c_dev, > .i2c_xfers = dw_i3c_master_i2c_xfers, > diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c > index 97b151564d3d31092975cec14958a17ddcd91d13..8eb76b8ca2b00a46a65f3a6dc7416d8af7ca288d 100644 > --- a/drivers/i3c/master/i3c-master-cdns.c > +++ b/drivers/i3c/master/i3c-master-cdns.c > @@ -720,9 +720,9 @@ static int cdns_i3c_master_send_ccc_cmd(struct i3c_master_controller *m, > return ret; > } > > -static int cdns_i3c_master_priv_xfers(struct i3c_dev_desc *dev, > - struct i3c_priv_xfer *xfers, > - int nxfers) > +static int cdns_i3c_master_i3c_xfers(struct i3c_dev_desc *dev, > + struct i3c_xfer *xfers, > + int nxfers, enum i3c_xfer_mode mode) > { > struct i3c_master_controller *m = i3c_dev_get_master(dev); > struct cdns_i3c_master *master = to_cdns_i3c_master(m); > @@ -1519,7 +1519,7 @@ static const struct i3c_master_controller_ops cdns_i3c_master_ops = { > .detach_i2c_dev = cdns_i3c_master_detach_i2c_dev, > .supports_ccc_cmd = cdns_i3c_master_supports_ccc_cmd, > .send_ccc_cmd = cdns_i3c_master_send_ccc_cmd, > - .priv_xfers = cdns_i3c_master_priv_xfers, > + .i3c_xfers = cdns_i3c_master_i3c_xfers, > .i2c_xfers = cdns_i3c_master_i2c_xfers, > .enable_ibi = cdns_i3c_master_enable_ibi, > .disable_ibi = cdns_i3c_master_disable_ibi, > diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c > index 47e42cb4dbe71edc5a022f4cb0fdf33a281eb4a7..607d77ab0e54691705845c33a79939820a83c9f0 100644 > --- a/drivers/i3c/master/mipi-i3c-hci/core.c > +++ b/drivers/i3c/master/mipi-i3c-hci/core.c > @@ -266,9 +266,9 @@ static int i3c_hci_daa(struct i3c_master_controller *m) > return hci->cmd->perform_daa(hci); > } > > -static int i3c_hci_priv_xfers(struct i3c_dev_desc *dev, > - struct i3c_priv_xfer *i3c_xfers, > - int nxfers) > +static int i3c_hci_i3c_xfers(struct i3c_dev_desc *dev, > + struct i3c_xfer *i3c_xfers, int nxfers, > + enum i3c_xfer_mode mode) > { > struct i3c_master_controller *m = i3c_dev_get_master(dev); > struct i3c_hci *hci = to_i3c_hci(m); > @@ -515,7 +515,7 @@ static const struct i3c_master_controller_ops i3c_hci_ops = { > .bus_cleanup = i3c_hci_bus_cleanup, > .do_daa = i3c_hci_daa, > .send_ccc_cmd = i3c_hci_send_ccc_cmd, > - .priv_xfers = i3c_hci_priv_xfers, > + .i3c_xfers = i3c_hci_i3c_xfers, > .i2c_xfers = i3c_hci_i2c_xfers, > .attach_i3c_dev = i3c_hci_attach_i3c_dev, > .reattach_i3c_dev = i3c_hci_reattach_i3c_dev, > diff --git a/drivers/i3c/master/renesas-i3c.c b/drivers/i3c/master/renesas-i3c.c > index 275f7b9242886ee77a647149a808e2f184fb0447..426a418f29b61256fbbfc50cf578bf04629ec391 100644 > --- a/drivers/i3c/master/renesas-i3c.c > +++ b/drivers/i3c/master/renesas-i3c.c > @@ -794,8 +794,8 @@ static int renesas_i3c_send_ccc_cmd(struct i3c_master_controller *m, > return ret; > } > > -static int renesas_i3c_priv_xfers(struct i3c_dev_desc *dev, struct i3c_priv_xfer *i3c_xfers, > - int i3c_nxfers) > +static int renesas_i3c_i3c_xfers(struct i3c_dev_desc *dev, struct i3c_xfer *i3c_xfers, > + int i3c_nxfers, enum i3c_xfer_mode mode) > { > struct i3c_master_controller *m = i3c_dev_get_master(dev); > struct renesas_i3c *i3c = to_renesas_i3c(m); > @@ -1282,7 +1282,7 @@ static const struct i3c_master_controller_ops renesas_i3c_ops = { > .do_daa = renesas_i3c_daa, > .supports_ccc_cmd = renesas_i3c_supports_ccc_cmd, > .send_ccc_cmd = renesas_i3c_send_ccc_cmd, > - .priv_xfers = renesas_i3c_priv_xfers, > + .i3c_xfers = renesas_i3c_i3c_xfers, > .attach_i2c_dev = renesas_i3c_attach_i2c_dev, > .detach_i2c_dev = renesas_i3c_detach_i2c_dev, > .i2c_xfers = renesas_i3c_i2c_xfers, > > -- > 2.34.1 > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] i3c: master: cleanup callback .priv_xfers() 2025-12-03 20:45 [PATCH v2 0/2] i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers() Frank Li 2025-12-03 20:45 ` [PATCH v2 1/2] " Frank Li @ 2025-12-03 20:45 ` Frank Li 2025-12-04 9:58 ` Tommaso Merciai 2025-12-12 23:07 ` [PATCH v2 0/2] i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers() Alexandre Belloni 2 siblings, 1 reply; 6+ messages in thread From: Frank Li @ 2025-12-03 20:45 UTC (permalink / raw) To: Jorge Marques, Alexandre Belloni, Przemysław Gaj, Wolfram Sang, Tommaso Merciai Cc: linux-i3c, linux-kernel, imx, Frank Li 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> --- drivers/i3c/master.c | 14 ++------------ include/linux/i3c/master.h | 11 +---------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index f88f7e19203ae5a90267b2491f3b13b6205863e8..ea45a519dd68a514fd7fe8314b3fcf2c5604aa64 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -2819,14 +2819,10 @@ EXPORT_SYMBOL_GPL(i3c_generic_ibi_recycle_slot); static int i3c_master_check_ops(const struct i3c_master_controller_ops *ops) { - if (!ops || !ops->bus_init || + if (!ops || !ops->bus_init || !ops->i3c_xfers || !ops->send_ccc_cmd || !ops->do_daa || !ops->i2c_xfers) return -EINVAL; - /* Must provide one of priv_xfers (SDR only) or i3c_xfers (all modes) */ - if (!ops->priv_xfers && !ops->i3c_xfers) - return -EINVAL; - if (ops->request_ibi && (!ops->enable_ibi || !ops->disable_ibi || !ops->free_ibi || !ops->recycle_ibi_slot)) @@ -3031,13 +3027,7 @@ int i3c_dev_do_xfers_locked(struct i3c_dev_desc *dev, struct i3c_xfer *xfers, if (mode != I3C_SDR && !(master->this->info.hdr_cap & BIT(mode))) return -EOPNOTSUPP; - if (master->ops->i3c_xfers) - return master->ops->i3c_xfers(dev, xfers, nxfers, mode); - - if (mode != I3C_SDR) - return -EINVAL; - - return master->ops->priv_xfers(dev, xfers, nxfers); + return master->ops->i3c_xfers(dev, xfers, nxfers, mode); } int i3c_dev_disable_ibi_locked(struct i3c_dev_desc *dev) diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h index 2fd850f4678b22f352507f8f55910a196536a1e5..6225ad28f210fa15a8f2d521a565ef06995e2470 100644 --- a/include/linux/i3c/master.h +++ b/include/linux/i3c/master.h @@ -417,12 +417,7 @@ struct i3c_bus { * all CCC commands are supported. * @send_ccc_cmd: send a CCC command * This method is mandatory. - * @priv_xfers: do one or several private I3C SDR transfers - * This method is mandatory when i3c_xfers is not implemented. It - * is deprecated. - * @i3c_xfers: do one or several I3C SDR or HDR transfers - * This method is mandatory when priv_xfers is not implemented but - * should be implemented instead of priv_xfers. + * @i3c_xfers: do one or several I3C SDR or HDR transfers. * @attach_i2c_dev: called every time an I2C device is attached to the bus. * This is a good place to attach master controller specific * data to I2C devices. @@ -478,10 +473,6 @@ struct i3c_master_controller_ops { const struct i3c_ccc_cmd *cmd); int (*send_ccc_cmd)(struct i3c_master_controller *master, struct i3c_ccc_cmd *cmd); - /* Deprecated, please use i3c_xfers() */ - int (*priv_xfers)(struct i3c_dev_desc *dev, - struct i3c_priv_xfer *xfers, - int nxfers); int (*i3c_xfers)(struct i3c_dev_desc *dev, struct i3c_xfer *xfers, int nxfers, enum i3c_xfer_mode mode); -- 2.34.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] i3c: master: cleanup callback .priv_xfers() 2025-12-03 20:45 ` [PATCH v2 2/2] i3c: master: cleanup callback .priv_xfers() Frank Li @ 2025-12-04 9:58 ` Tommaso Merciai 0 siblings, 0 replies; 6+ messages in thread From: Tommaso Merciai @ 2025-12-04 9:58 UTC (permalink / raw) To: Frank Li Cc: Jorge Marques, Alexandre Belloni, Przemysław Gaj, Wolfram Sang, linux-i3c, linux-kernel, imx On Wed, Dec 03, 2025 at 03:45:51PM -0500, Frank Li wrote: > Remove the .priv_xfers() callback from the framework after all master > controller drivers have switched to use the new .i3c_xfers() callback. > Tested-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> > Signed-off-by: Frank Li <Frank.Li@nxp.com> > --- > drivers/i3c/master.c | 14 ++------------ > include/linux/i3c/master.h | 11 +---------- > 2 files changed, 3 insertions(+), 22 deletions(-) > > diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c > index f88f7e19203ae5a90267b2491f3b13b6205863e8..ea45a519dd68a514fd7fe8314b3fcf2c5604aa64 100644 > --- a/drivers/i3c/master.c > +++ b/drivers/i3c/master.c > @@ -2819,14 +2819,10 @@ EXPORT_SYMBOL_GPL(i3c_generic_ibi_recycle_slot); > > static int i3c_master_check_ops(const struct i3c_master_controller_ops *ops) > { > - if (!ops || !ops->bus_init || > + if (!ops || !ops->bus_init || !ops->i3c_xfers || > !ops->send_ccc_cmd || !ops->do_daa || !ops->i2c_xfers) > return -EINVAL; > > - /* Must provide one of priv_xfers (SDR only) or i3c_xfers (all modes) */ > - if (!ops->priv_xfers && !ops->i3c_xfers) > - return -EINVAL; > - > if (ops->request_ibi && > (!ops->enable_ibi || !ops->disable_ibi || !ops->free_ibi || > !ops->recycle_ibi_slot)) > @@ -3031,13 +3027,7 @@ int i3c_dev_do_xfers_locked(struct i3c_dev_desc *dev, struct i3c_xfer *xfers, > if (mode != I3C_SDR && !(master->this->info.hdr_cap & BIT(mode))) > return -EOPNOTSUPP; > > - if (master->ops->i3c_xfers) > - return master->ops->i3c_xfers(dev, xfers, nxfers, mode); > - > - if (mode != I3C_SDR) > - return -EINVAL; > - > - return master->ops->priv_xfers(dev, xfers, nxfers); > + return master->ops->i3c_xfers(dev, xfers, nxfers, mode); > } > > int i3c_dev_disable_ibi_locked(struct i3c_dev_desc *dev) > diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h > index 2fd850f4678b22f352507f8f55910a196536a1e5..6225ad28f210fa15a8f2d521a565ef06995e2470 100644 > --- a/include/linux/i3c/master.h > +++ b/include/linux/i3c/master.h > @@ -417,12 +417,7 @@ struct i3c_bus { > * all CCC commands are supported. > * @send_ccc_cmd: send a CCC command > * This method is mandatory. > - * @priv_xfers: do one or several private I3C SDR transfers > - * This method is mandatory when i3c_xfers is not implemented. It > - * is deprecated. > - * @i3c_xfers: do one or several I3C SDR or HDR transfers > - * This method is mandatory when priv_xfers is not implemented but > - * should be implemented instead of priv_xfers. > + * @i3c_xfers: do one or several I3C SDR or HDR transfers. > * @attach_i2c_dev: called every time an I2C device is attached to the bus. > * This is a good place to attach master controller specific > * data to I2C devices. > @@ -478,10 +473,6 @@ struct i3c_master_controller_ops { > const struct i3c_ccc_cmd *cmd); > int (*send_ccc_cmd)(struct i3c_master_controller *master, > struct i3c_ccc_cmd *cmd); > - /* Deprecated, please use i3c_xfers() */ > - int (*priv_xfers)(struct i3c_dev_desc *dev, > - struct i3c_priv_xfer *xfers, > - int nxfers); > int (*i3c_xfers)(struct i3c_dev_desc *dev, > struct i3c_xfer *xfers, > int nxfers, enum i3c_xfer_mode mode); > > -- > 2.34.1 > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers() 2025-12-03 20:45 [PATCH v2 0/2] i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers() Frank Li 2025-12-03 20:45 ` [PATCH v2 1/2] " Frank Li 2025-12-03 20:45 ` [PATCH v2 2/2] i3c: master: cleanup callback .priv_xfers() Frank Li @ 2025-12-12 23:07 ` Alexandre Belloni 2 siblings, 0 replies; 6+ messages in thread From: Alexandre Belloni @ 2025-12-12 23:07 UTC (permalink / raw) To: Jorge Marques, Przemysław Gaj, Wolfram Sang, Tommaso Merciai, Frank Li Cc: linux-i3c, linux-kernel, imx On Wed, 03 Dec 2025 15:45:49 -0500, Frank Li wrote: > switch all controller driver use new callback .i3c_xfers() from > .priv_xfers() and remove .priv_xfers() in framework. > > This serise is base on > https://lore.kernel.org/linux-i3c/20251027-i3c_ddr-v7-0-866a0ff7fc46@nxp.com/T/#t > > > [...] Applied, thanks! [1/2] i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers() https://git.kernel.org/abelloni/c/eaa0870387f9 [2/2] i3c: master: cleanup callback .priv_xfers() https://git.kernel.org/abelloni/c/41b80d43d9a0 I4ve tweked the doc change in this one. Best regards, -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-12-12 23:07 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-12-03 20:45 [PATCH v2 0/2] i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers() Frank Li 2025-12-03 20:45 ` [PATCH v2 1/2] " Frank Li 2025-12-04 9:57 ` Tommaso Merciai 2025-12-03 20:45 ` [PATCH v2 2/2] i3c: master: cleanup callback .priv_xfers() Frank Li 2025-12-04 9:58 ` Tommaso Merciai 2025-12-12 23:07 ` [PATCH v2 0/2] i3c: master: switch to use new callback .i3c_xfers() from .priv_xfers() Alexandre Belloni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox