linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/64] i2c: reword i2c_algorithm according to newest specification
@ 2024-03-22 13:24 Wolfram Sang
  2024-03-22 13:25 ` [PATCH 19/64] i2c: emev2: reword " Wolfram Sang
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Wolfram Sang @ 2024-03-22 13:24 UTC (permalink / raw)
  To: linux-i2c
  Cc: Wolfram Sang, asahi, chrome-platform, imx, linux-actions,
	linux-amlogic, linux-arm-kernel, linux-arm-msm, linux-aspeed,
	linux-kernel, linux-mediatek, linux-mips, linux-omap,
	linuxppc-dev, linux-renesas-soc, linux-riscv, linux-rockchip,
	linux-rpi-kernel, linux-samsung-soc, linux-stm32, linux-sunxi,
	linux-tegra, openbmc, virtualization

Okay, we need to begin somewhere...

Start changing the wording of the I2C main header wrt. the newest I2C
v7, SMBus 3.2, I3C specifications and replace "master/slave" with more
appropriate terms. This first step renames the members of struct
i2c_algorithm. Once all in-tree users are converted, the anonymous union
will go away again. All this work will also pave the way for finally
seperating the monolithic header into more fine-grained headers like
"i2c/clients.h" etc. So, this is not a simple renaming-excercise but
also a chance to update the I2C core to recent Linux standards.

My motivation is to improve the I2C core API, in general. My motivation
is not to clean each and every driver. I think this is impossible
because register names based on official documentation will need to stay
as they are. But the Linux-internal names should be updated IMO.

That being said, I worked on 62 drivers in this series beyond plain
renames inside 'struct i2c_algorithm' because the fruits were so
low-hanging. Before this series, 112 files in the 'busses/' directory
contained 'master' and/or 'slave'. After the series, only 57. Why not?

Next step is updating the drivers outside the 'i2c'-folder regarding
'struct i2c_algorithm' so we can remove the anonymous union ASAP. To be
able to work on this with minimal dependencies, I'd like to apply this
series between -rc1 and -rc2.

I hope this will work for you guys. The changes are really minimal. If
you are not comfortable with changes to your driver or need more time to
review, please NACK the patch and I will drop the patch and/or address
the issues separeately.

@Andi: are you okay with this approach? It means you'd need to merge
-rc2 into your for-next branch. Or rebase if all fails.

Speaking of Andi, thanks a lot to him taking care of the controller
drivers these days. His work really gives me the freedom to work on I2C
core issues again. Also, Renesas deserves a honorable mention here for
increased support of my I2C activities. Thank you!

If you have comments, hints, etc, please let me know.

Happy hacking,

   Wolfram


Wolfram Sang (64):
  i2c: reword i2c_algorithm according to newest specification
  i2c: ali15x3: reword according to newest specification
  i2c: altera: reword according to newest specification
  i2c: amd-mp2-pci: reword according to newest specification
  i2c: aspeed: reword according to newest specification
  i2c: au1550: reword according to newest specification
  i2c: bcm-iproc: reword according to newest specification
  i2c: bcm-kona: reword according to newest specification
  i2c: bcm2835: reword according to newest specification
  i2c: brcmstb: reword according to newest specification
  i2c: cadence: reword according to newest specification
  i2c: cht-wc: reword according to newest specification
  i2c: cp2615: reword according to newest specification
  i2c: cpm: reword according to newest specification
  i2c: davinci: reword according to newest specification
  i2c: digicolor: reword according to newest specification
  i2c: dln2: reword according to newest specification
  i2c: eg20t: reword according to newest specification
  i2c: emev2: reword according to newest specification
  i2c: fsi: reword according to newest specification
  i2c: gpio: reword according to newest specification
  i2c: highlander: reword according to newest specification
  i2c: hix5hd2: reword according to newest specification
  i2c: i801: reword according to newest specification
  i2c: ibm_iic: reword according to newest specification
  i2c: imx-lpi2c: reword according to newest specification
  i2c: iop3xx: reword according to newest specification
  i2c: isch: reword according to newest specification
  i2c: ismt: reword according to newest specification
  i2c: ljca: reword according to newest specification
  i2c: lpc2k: reword according to newest specification
  i2c: ls2x: reword according to newest specification
  i2c: mchp-pci1xxxx: reword according to newest specification
  i2c: microchip-corei2c: reword according to newest specification
  i2c: mlxcpld: reword according to newest specification
  i2c: mpc: reword according to newest specification
  i2c: mt7621: reword according to newest specification
  i2c: mv64xxx: reword according to newest specification
  i2c: octeon-core: reword according to newest specification
  i2c: owl: reword according to newest specification
  i2c: piix4: reword according to newest specification
  i2c: powermac: reword according to newest specification
  i2c: pxa-pci: reword according to newest specification
  i2c: qup: reword according to newest specification
  i2c: rcar: reword according to newest specification
  i2c: riic: reword according to newest specification
  i2c: rk3x: reword according to newest specification
  i2c: sh7760: reword according to newest specification
  i2c: sh_mobile: reword according to newest specification
  i2c: sis5595: reword according to newest specification
  i2c: sis630: reword according to newest specification
  i2c: sprd: reword according to newest specification
  i2c: st: reword according to newest specification
  i2c: stm32f4: reword according to newest specification
  i2c: sun6i-p2wi: reword according to newest specification
  i2c: synquacer: reword according to newest specification
  i2c: taos-evm: reword according to newest specification
  i2c: tiny-usb: reword according to newest specification
  i2c: uniphier-f: reword according to newest specification
  i2c: uniphier: reword according to newest specification
  i2c: viperboard: reword according to newest specification
  i2c: xlp9xx: reword according to newest specification
  i2c: scx200_acb: reword according to newest specification
  i2c: reword i2c_algorithm in drivers according to newest specification

 drivers/i2c/busses/i2c-ali15x3.c           |  2 +-
 drivers/i2c/busses/i2c-altera.c            |  4 +-
 drivers/i2c/busses/i2c-amd-mp2-pci.c       |  8 ++--
 drivers/i2c/busses/i2c-amd-mp2-plat.c      |  2 +-
 drivers/i2c/busses/i2c-aspeed.c            | 26 +++++-----
 drivers/i2c/busses/i2c-at91-master.c       |  2 +-
 drivers/i2c/busses/i2c-at91-slave.c        |  8 ++--
 drivers/i2c/busses/i2c-au1550.c            | 14 +++---
 drivers/i2c/busses/i2c-axxia.c             | 10 ++--
 drivers/i2c/busses/i2c-bcm-iproc.c         | 20 ++++----
 drivers/i2c/busses/i2c-bcm-kona.c          | 14 +++---
 drivers/i2c/busses/i2c-bcm2835.c           |  8 ++--
 drivers/i2c/busses/i2c-brcmstb.c           | 12 ++---
 drivers/i2c/busses/i2c-cadence.c           | 14 +++---
 drivers/i2c/busses/i2c-cht-wc.c            |  8 ++--
 drivers/i2c/busses/i2c-cp2615.c            |  6 +--
 drivers/i2c/busses/i2c-cpm.c               |  4 +-
 drivers/i2c/busses/i2c-cros-ec-tunnel.c    |  2 +-
 drivers/i2c/busses/i2c-davinci.c           | 13 +++--
 drivers/i2c/busses/i2c-designware-master.c |  2 +-
 drivers/i2c/busses/i2c-designware-slave.c  |  8 ++--
 drivers/i2c/busses/i2c-digicolor.c         |  4 +-
 drivers/i2c/busses/i2c-diolan-u2c.c        |  2 +-
 drivers/i2c/busses/i2c-dln2.c              |  4 +-
 drivers/i2c/busses/i2c-eg20t.c             | 10 ++--
 drivers/i2c/busses/i2c-emev2.c             | 10 ++--
 drivers/i2c/busses/i2c-exynos5.c           |  4 +-
 drivers/i2c/busses/i2c-fsi.c               | 56 +++++++++++-----------
 drivers/i2c/busses/i2c-gpio.c              |  8 ++--
 drivers/i2c/busses/i2c-gxp.c               | 12 ++---
 drivers/i2c/busses/i2c-highlander.c        |  2 +-
 drivers/i2c/busses/i2c-hisi.c              |  4 +-
 drivers/i2c/busses/i2c-hix5hd2.c           |  4 +-
 drivers/i2c/busses/i2c-i801.c              | 12 ++---
 drivers/i2c/busses/i2c-ibm_iic.c           | 26 +++++-----
 drivers/i2c/busses/i2c-img-scb.c           |  2 +-
 drivers/i2c/busses/i2c-imx-lpi2c.c         | 10 ++--
 drivers/i2c/busses/i2c-imx.c               | 12 ++---
 drivers/i2c/busses/i2c-iop3xx.c            | 10 ++--
 drivers/i2c/busses/i2c-isch.c              |  2 +-
 drivers/i2c/busses/i2c-ismt.c              |  2 +-
 drivers/i2c/busses/i2c-jz4780.c            |  2 +-
 drivers/i2c/busses/i2c-kempld.c            |  2 +-
 drivers/i2c/busses/i2c-ljca.c              | 20 ++++----
 drivers/i2c/busses/i2c-lpc2k.c             |  8 ++--
 drivers/i2c/busses/i2c-ls2x.c              |  8 ++--
 drivers/i2c/busses/i2c-mchp-pci1xxxx.c     | 40 ++++++++--------
 drivers/i2c/busses/i2c-meson.c             |  4 +-
 drivers/i2c/busses/i2c-microchip-corei2c.c |  4 +-
 drivers/i2c/busses/i2c-mlxbf.c             |  8 ++--
 drivers/i2c/busses/i2c-mlxcpld.c           | 12 ++---
 drivers/i2c/busses/i2c-mpc.c               |  4 +-
 drivers/i2c/busses/i2c-mt65xx.c            |  2 +-
 drivers/i2c/busses/i2c-mt7621.c            | 22 ++++-----
 drivers/i2c/busses/i2c-mv64xxx.c           | 12 ++---
 drivers/i2c/busses/i2c-mxs.c               |  2 +-
 drivers/i2c/busses/i2c-nomadik.c           |  2 +-
 drivers/i2c/busses/i2c-npcm7xx.c           | 12 ++---
 drivers/i2c/busses/i2c-nvidia-gpu.c        |  4 +-
 drivers/i2c/busses/i2c-ocores.c            |  8 ++--
 drivers/i2c/busses/i2c-octeon-core.c       |  6 +--
 drivers/i2c/busses/i2c-octeon-platdrv.c    |  2 +-
 drivers/i2c/busses/i2c-omap.c              |  4 +-
 drivers/i2c/busses/i2c-opal.c              |  4 +-
 drivers/i2c/busses/i2c-owl.c               | 10 ++--
 drivers/i2c/busses/i2c-pasemi-core.c       |  2 +-
 drivers/i2c/busses/i2c-piix4.c             |  2 +-
 drivers/i2c/busses/i2c-pnx.c               |  2 +-
 drivers/i2c/busses/i2c-powermac.c          |  8 ++--
 drivers/i2c/busses/i2c-pxa-pci.c           |  2 +-
 drivers/i2c/busses/i2c-pxa.c               | 12 ++---
 drivers/i2c/busses/i2c-qcom-cci.c          |  2 +-
 drivers/i2c/busses/i2c-qcom-geni.c         |  2 +-
 drivers/i2c/busses/i2c-qup.c               |  6 +--
 drivers/i2c/busses/i2c-rcar.c              | 16 +++----
 drivers/i2c/busses/i2c-riic.c              |  6 +--
 drivers/i2c/busses/i2c-rk3x.c              | 18 +++----
 drivers/i2c/busses/i2c-robotfuzz-osif.c    |  2 +-
 drivers/i2c/busses/i2c-rzv2m.c             |  8 ++--
 drivers/i2c/busses/i2c-s3c2410.c           |  4 +-
 drivers/i2c/busses/i2c-sh7760.c            | 18 +++----
 drivers/i2c/busses/i2c-sh_mobile.c         | 12 ++---
 drivers/i2c/busses/i2c-sis5595.c           |  2 +-
 drivers/i2c/busses/i2c-sis630.c            | 16 +++----
 drivers/i2c/busses/i2c-sprd.c              | 14 +++---
 drivers/i2c/busses/i2c-st.c                | 17 +++----
 drivers/i2c/busses/i2c-stm32f4.c           |  8 ++--
 drivers/i2c/busses/i2c-stm32f7.c           | 14 +++---
 drivers/i2c/busses/i2c-sun6i-p2wi.c        | 20 ++++----
 drivers/i2c/busses/i2c-synquacer.c         | 30 ++++++------
 drivers/i2c/busses/i2c-taos-evm.c          |  2 +-
 drivers/i2c/busses/i2c-tegra-bpmp.c        |  4 +-
 drivers/i2c/busses/i2c-tegra.c             |  4 +-
 drivers/i2c/busses/i2c-thunderx-pcidrv.c   |  2 +-
 drivers/i2c/busses/i2c-tiny-usb.c          |  4 +-
 drivers/i2c/busses/i2c-uniphier-f.c        | 22 ++++-----
 drivers/i2c/busses/i2c-uniphier.c          | 12 ++---
 drivers/i2c/busses/i2c-viperboard.c        |  8 ++--
 drivers/i2c/busses/i2c-virtio.c            |  2 +-
 drivers/i2c/busses/i2c-wmt.c               |  2 +-
 drivers/i2c/busses/i2c-xiic.c              |  2 +-
 drivers/i2c/busses/i2c-xlp9xx.c            |  4 +-
 drivers/i2c/busses/scx200_acb.c            |  4 +-
 include/linux/i2c.h                        | 24 ++++++++--
 104 files changed, 460 insertions(+), 464 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 19/64] i2c: emev2: reword according to newest specification
  2024-03-22 13:24 [PATCH 00/64] i2c: reword i2c_algorithm according to newest specification Wolfram Sang
@ 2024-03-22 13:25 ` Wolfram Sang
  2024-03-22 13:25 ` [PATCH 45/64] i2c: rcar: " Wolfram Sang
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 20+ messages in thread
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
  To: linux-i2c; +Cc: Wolfram Sang, Andi Shyti, linux-renesas-soc, linux-kernel

Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/busses/i2c-emev2.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/i2c/busses/i2c-emev2.c b/drivers/i2c/busses/i2c-emev2.c
index 557409410445..e67c55abff88 100644
--- a/drivers/i2c/busses/i2c-emev2.c
+++ b/drivers/i2c/busses/i2c-emev2.c
@@ -314,7 +314,7 @@ static u32 em_i2c_func(struct i2c_adapter *adap)
 	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_SLAVE;
 }
 
-static int em_i2c_reg_slave(struct i2c_client *slave)
+static int em_i2c_reg_target(struct i2c_client *slave)
 {
 	struct em_i2c_device *priv = i2c_get_adapdata(slave->adapter);
 
@@ -332,7 +332,7 @@ static int em_i2c_reg_slave(struct i2c_client *slave)
 	return 0;
 }
 
-static int em_i2c_unreg_slave(struct i2c_client *slave)
+static int em_i2c_unreg_target(struct i2c_client *slave)
 {
 	struct em_i2c_device *priv = i2c_get_adapdata(slave->adapter);
 
@@ -352,10 +352,10 @@ static int em_i2c_unreg_slave(struct i2c_client *slave)
 }
 
 static const struct i2c_algorithm em_i2c_algo = {
-	.master_xfer = em_i2c_xfer,
+	.xfer = em_i2c_xfer,
 	.functionality = em_i2c_func,
-	.reg_slave      = em_i2c_reg_slave,
-	.unreg_slave    = em_i2c_unreg_slave,
+	.reg_target      = em_i2c_reg_target,
+	.unreg_target    = em_i2c_unreg_target,
 };
 
 static int em_i2c_probe(struct platform_device *pdev)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 45/64] i2c: rcar: reword according to newest specification
  2024-03-22 13:24 [PATCH 00/64] i2c: reword i2c_algorithm according to newest specification Wolfram Sang
  2024-03-22 13:25 ` [PATCH 19/64] i2c: emev2: reword " Wolfram Sang
@ 2024-03-22 13:25 ` Wolfram Sang
  2024-03-22 13:25 ` [PATCH 46/64] i2c: riic: " Wolfram Sang
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 20+ messages in thread
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
  To: linux-i2c; +Cc: Wolfram Sang, Andi Shyti, linux-renesas-soc, linux-kernel

Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/busses/i2c-rcar.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 828aa2ea0fe4..4be75fdc7187 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -883,7 +883,7 @@ static int rcar_i2c_do_reset(struct rcar_i2c_priv *priv)
 					100, false, priv->rstc);
 }
 
-static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
+static int rcar_i2c_xfer(struct i2c_adapter *adap,
 				struct i2c_msg *msgs,
 				int num)
 {
@@ -944,7 +944,7 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
 	return ret;
 }
 
-static int rcar_i2c_master_xfer_atomic(struct i2c_adapter *adap,
+static int rcar_i2c_xfer_atomic(struct i2c_adapter *adap,
 				struct i2c_msg *msgs,
 				int num)
 {
@@ -1003,7 +1003,7 @@ static int rcar_i2c_master_xfer_atomic(struct i2c_adapter *adap,
 	return ret;
 }
 
-static int rcar_reg_slave(struct i2c_client *slave)
+static int rcar_reg_target(struct i2c_client *slave)
 {
 	struct rcar_i2c_priv *priv = i2c_get_adapdata(slave->adapter);
 
@@ -1025,7 +1025,7 @@ static int rcar_reg_slave(struct i2c_client *slave)
 	return 0;
 }
 
-static int rcar_unreg_slave(struct i2c_client *slave)
+static int rcar_unreg_target(struct i2c_client *slave)
 {
 	struct rcar_i2c_priv *priv = i2c_get_adapdata(slave->adapter);
 
@@ -1066,11 +1066,11 @@ static u32 rcar_i2c_func(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm rcar_i2c_algo = {
-	.master_xfer	= rcar_i2c_master_xfer,
-	.master_xfer_atomic = rcar_i2c_master_xfer_atomic,
+	.xfer	= rcar_i2c_xfer,
+	.xfer_atomic = rcar_i2c_xfer_atomic,
 	.functionality	= rcar_i2c_func,
-	.reg_slave	= rcar_reg_slave,
-	.unreg_slave	= rcar_unreg_slave,
+	.reg_target	= rcar_reg_target,
+	.unreg_target	= rcar_unreg_target,
 };
 
 static const struct i2c_adapter_quirks rcar_i2c_quirks = {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 46/64] i2c: riic: reword according to newest specification
  2024-03-22 13:24 [PATCH 00/64] i2c: reword i2c_algorithm according to newest specification Wolfram Sang
  2024-03-22 13:25 ` [PATCH 19/64] i2c: emev2: reword " Wolfram Sang
  2024-03-22 13:25 ` [PATCH 45/64] i2c: rcar: " Wolfram Sang
@ 2024-03-22 13:25 ` Wolfram Sang
  2024-03-22 13:25 ` [PATCH 49/64] i2c: sh_mobile: " Wolfram Sang
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 20+ messages in thread
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
  To: linux-i2c
  Cc: Wolfram Sang, Chris Brandt, Andi Shyti, linux-renesas-soc, linux-kernel

Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/busses/i2c-riic.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c
index e43ff483c56e..685a65153fa8 100644
--- a/drivers/i2c/busses/i2c-riic.c
+++ b/drivers/i2c/busses/i2c-riic.c
@@ -12,9 +12,9 @@
  *
  * 1) The main xfer routine kicks off a transmission by putting the start bit
  * (or repeated start) on the bus and enabling the transmit interrupt (TIE)
- * since we need to send the slave address + RW bit in every case.
+ * since we need to send the client address + RW bit in every case.
  *
- * 2) TIE sends slave address + RW bit and selects how to continue.
+ * 2) TIE sends client address + RW bit and selects how to continue.
  *
  * 3a) Write case: We keep utilizing TIE as long as we have data to send. If we
  * are done, we switch over to the transmission done interrupt (TEIE) and mark
@@ -276,7 +276,7 @@ static u32 riic_func(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm riic_algo = {
-	.master_xfer	= riic_xfer,
+	.xfer	= riic_xfer,
 	.functionality	= riic_func,
 };
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 49/64] i2c: sh_mobile: reword according to newest specification
  2024-03-22 13:24 [PATCH 00/64] i2c: reword i2c_algorithm according to newest specification Wolfram Sang
                   ` (2 preceding siblings ...)
  2024-03-22 13:25 ` [PATCH 46/64] i2c: riic: " Wolfram Sang
@ 2024-03-22 13:25 ` Wolfram Sang
  2024-03-22 13:25 ` [PATCH 64/64] i2c: reword i2c_algorithm in drivers " Wolfram Sang
  2024-03-23  9:20 ` [PATCH 00/64] i2c: reword i2c_algorithm " Andi Shyti
  5 siblings, 0 replies; 20+ messages in thread
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
  To: linux-i2c; +Cc: Wolfram Sang, Andi Shyti, linux-renesas-soc, linux-kernel

Match the wording of this driver wrt. the newest I2C v7, SMBus 3.2, I3C
specifications and replace "master/slave" with more appropriate terms.
They are also more specific because we distinguish now between a remote
entity ("client") and a local one ("target").

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/busses/i2c-sh_mobile.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index c65ac3d7eadc..276a036d8ef0 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -53,7 +53,7 @@
 /*                                                                          */
 /* Receive operation:                                                       */
 /*                                                                          */
-/* 0 byte receive - not supported since slave may hold SDA low              */
+/* 0 byte receive - not supported since client may hold SDA low             */
 /*                                                                          */
 /* 1 byte receive       [TX] | [RX]                                         */
 /* BUS:     S     A8     ACK | D8(1)   ACK   P(*)                           */
@@ -93,7 +93,7 @@
 /*         _______________________________________________                  */
 /* BUSY __/                                               \_                */
 /*                                                                          */
-/* (*) The STOP condition is only sent by the master at the end of the last */
+/* (*) The STOP condition is only sent by the host at the end of the last   */
 /* I2C message or if the I2C_M_STOP flag is set. Similarly, the BUSY bit is */
 /* only cleared after the STOP condition, so, between messages we have to   */
 /* poll for the DTE bit.                                                    */
@@ -495,7 +495,7 @@ static struct dma_chan *sh_mobile_i2c_request_dma_chan(struct device *dev,
 
 	ret = dmaengine_slave_config(chan, &cfg);
 	if (ret) {
-		dev_dbg(dev, "slave_config failed for %s (%d)\n", chan_name, ret);
+		dev_dbg(dev, "DMA config failed for %s (%d)\n", chan_name, ret);
 		dma_release_channel(chan);
 		return ERR_PTR(ret);
 	}
@@ -540,7 +540,7 @@ static void sh_mobile_i2c_xfer_dma(struct sh_mobile_i2c_data *pd)
 					 read ? DMA_DEV_TO_MEM : DMA_MEM_TO_DEV,
 					 DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
 	if (!txdesc) {
-		dev_dbg(pd->dev, "dma prep slave sg failed, using PIO\n");
+		dev_dbg(pd->dev, "dma prep sg failed, using PIO\n");
 		sh_mobile_i2c_cleanup_dma(pd, false);
 		return;
 	}
@@ -740,8 +740,8 @@ static u32 sh_mobile_i2c_func(struct i2c_adapter *adapter)
 
 static const struct i2c_algorithm sh_mobile_i2c_algorithm = {
 	.functionality = sh_mobile_i2c_func,
-	.master_xfer = sh_mobile_i2c_xfer,
-	.master_xfer_atomic = sh_mobile_i2c_xfer_atomic,
+	.xfer = sh_mobile_i2c_xfer,
+	.xfer_atomic = sh_mobile_i2c_xfer_atomic,
 };
 
 static const struct i2c_adapter_quirks sh_mobile_i2c_quirks = {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification
  2024-03-22 13:24 [PATCH 00/64] i2c: reword i2c_algorithm according to newest specification Wolfram Sang
                   ` (3 preceding siblings ...)
  2024-03-22 13:25 ` [PATCH 49/64] i2c: sh_mobile: " Wolfram Sang
@ 2024-03-22 13:25 ` Wolfram Sang
  2024-03-22 14:34   ` Bjorn Andersson
                     ` (5 more replies)
  2024-03-23  9:20 ` [PATCH 00/64] i2c: reword i2c_algorithm " Andi Shyti
  5 siblings, 6 replies; 20+ messages in thread
From: Wolfram Sang @ 2024-03-22 13:25 UTC (permalink / raw)
  To: linux-i2c
  Cc: Wolfram Sang, Elie Morisse, Shyam Sundar S K, Andi Shyti,
	Codrin Ciubotariu, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, Krzysztof Adamski, Benson Leung, Guenter Roeck,
	Jarkko Nikula, Andy Shevchenko, Mika Westerberg, Jan Dabros,
	Krzysztof Kozlowski, Alim Akhtar, Jean-Marie Verdun,
	Nick Hawkins, Yicong Yang, Oleksij Rempel,
	Pengutronix Kernel Team, Shawn Guo, Sascha Hauer, Fabio Estevam,
	Paul Cercueil, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Khalil Blaiech, Asmaa Mnebhi, Qii Wang,
	Matthias Brugger, AngeloGioacchino Del Regno, Linus Walleij,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Ajay Gupta, Peter Korsgaard,
	Andrew Lunn, Robert Richter, Aaro Koskinen, Janusz Krzysztofik,
	Tony Lindgren, Vignesh R, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Aneesh Kumar K.V, Naveen N. Rao, Hector Martin,
	Sven Peter, Alyssa Rosenzweig, Vladimir Zapolskiy, Loic Poulain,
	Robert Foss, Bjorn Andersson, Konrad Dybcio, Fabrizio Castro,
	Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Thierry Reding, Jonathan Hunter,
	Laxman Dewangan, Dmitry Osipenko, Conghui Chen, Viresh Kumar,
	Michal Simek, linux-kernel, linux-arm-kernel, chrome-platform,
	linux-samsung-soc, imx, linux-mips, linux-amlogic,
	linux-mediatek, openbmc, linux-omap, linuxppc-dev, asahi,
	linux-arm-msm, linux-renesas-soc, linux-stm32, linux-tegra,
	virtualization

Match the wording in i2c_algorithm in I2C drivers wrt. the newest I2C
v7, SMBus 3.2, I3C specifications and replace "master/slave" with more
appropriate terms. For some drivers, this means no more conversions are
needed. For the others more work needs to be done but this will be
performed incrementally along with API changes/improvements. All these
changes here are simple search/replace results.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/busses/i2c-amd-mp2-plat.c      |  2 +-
 drivers/i2c/busses/i2c-at91-master.c       |  2 +-
 drivers/i2c/busses/i2c-at91-slave.c        |  8 ++++----
 drivers/i2c/busses/i2c-axxia.c             | 10 +++++-----
 drivers/i2c/busses/i2c-cros-ec-tunnel.c    |  2 +-
 drivers/i2c/busses/i2c-designware-master.c |  2 +-
 drivers/i2c/busses/i2c-designware-slave.c  |  8 ++++----
 drivers/i2c/busses/i2c-diolan-u2c.c        |  2 +-
 drivers/i2c/busses/i2c-exynos5.c           |  4 ++--
 drivers/i2c/busses/i2c-gxp.c               | 12 ++++++------
 drivers/i2c/busses/i2c-hisi.c              |  4 ++--
 drivers/i2c/busses/i2c-img-scb.c           |  2 +-
 drivers/i2c/busses/i2c-imx.c               | 12 ++++++------
 drivers/i2c/busses/i2c-jz4780.c            |  2 +-
 drivers/i2c/busses/i2c-kempld.c            |  2 +-
 drivers/i2c/busses/i2c-meson.c             |  4 ++--
 drivers/i2c/busses/i2c-mlxbf.c             |  8 ++++----
 drivers/i2c/busses/i2c-mt65xx.c            |  2 +-
 drivers/i2c/busses/i2c-mxs.c               |  2 +-
 drivers/i2c/busses/i2c-nomadik.c           |  2 +-
 drivers/i2c/busses/i2c-npcm7xx.c           | 12 ++++++------
 drivers/i2c/busses/i2c-nvidia-gpu.c        |  4 ++--
 drivers/i2c/busses/i2c-ocores.c            |  8 ++++----
 drivers/i2c/busses/i2c-octeon-platdrv.c    |  2 +-
 drivers/i2c/busses/i2c-omap.c              |  4 ++--
 drivers/i2c/busses/i2c-opal.c              |  4 ++--
 drivers/i2c/busses/i2c-pasemi-core.c       |  2 +-
 drivers/i2c/busses/i2c-pnx.c               |  2 +-
 drivers/i2c/busses/i2c-pxa.c               | 12 ++++++------
 drivers/i2c/busses/i2c-qcom-cci.c          |  2 +-
 drivers/i2c/busses/i2c-qcom-geni.c         |  2 +-
 drivers/i2c/busses/i2c-robotfuzz-osif.c    |  2 +-
 drivers/i2c/busses/i2c-rzv2m.c             |  8 ++++----
 drivers/i2c/busses/i2c-s3c2410.c           |  4 ++--
 drivers/i2c/busses/i2c-stm32f7.c           | 14 +++++++-------
 drivers/i2c/busses/i2c-tegra-bpmp.c        |  4 ++--
 drivers/i2c/busses/i2c-tegra.c             |  4 ++--
 drivers/i2c/busses/i2c-thunderx-pcidrv.c   |  2 +-
 drivers/i2c/busses/i2c-virtio.c            |  2 +-
 drivers/i2c/busses/i2c-wmt.c               |  2 +-
 drivers/i2c/busses/i2c-xiic.c              |  2 +-
 41 files changed, 95 insertions(+), 95 deletions(-)

diff --git a/drivers/i2c/busses/i2c-amd-mp2-plat.c b/drivers/i2c/busses/i2c-amd-mp2-plat.c
index 112fe2bc5662..eb47de29ec90 100644
--- a/drivers/i2c/busses/i2c-amd-mp2-plat.c
+++ b/drivers/i2c/busses/i2c-amd-mp2-plat.c
@@ -179,7 +179,7 @@ static u32 i2c_amd_func(struct i2c_adapter *a)
 }
 
 static const struct i2c_algorithm i2c_amd_algorithm = {
-	.master_xfer = i2c_amd_xfer,
+	.xfer = i2c_amd_xfer,
 	.functionality = i2c_amd_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-at91-master.c b/drivers/i2c/busses/i2c-at91-master.c
index d311981d3e60..56223eee7755 100644
--- a/drivers/i2c/busses/i2c-at91-master.c
+++ b/drivers/i2c/busses/i2c-at91-master.c
@@ -739,7 +739,7 @@ static u32 at91_twi_func(struct i2c_adapter *adapter)
 }
 
 static const struct i2c_algorithm at91_twi_algorithm = {
-	.master_xfer	= at91_twi_xfer,
+	.xfer	= at91_twi_xfer,
 	.functionality	= at91_twi_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-at91-slave.c b/drivers/i2c/busses/i2c-at91-slave.c
index d6eeea5166c0..00234bf776ab 100644
--- a/drivers/i2c/busses/i2c-at91-slave.c
+++ b/drivers/i2c/busses/i2c-at91-slave.c
@@ -62,7 +62,7 @@ static irqreturn_t atmel_twi_interrupt_slave(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static int at91_reg_slave(struct i2c_client *slave)
+static int at91_reg_target(struct i2c_client *slave)
 {
 	struct at91_twi_dev *dev = i2c_get_adapdata(slave->adapter);
 
@@ -86,7 +86,7 @@ static int at91_reg_slave(struct i2c_client *slave)
 	return 0;
 }
 
-static int at91_unreg_slave(struct i2c_client *slave)
+static int at91_unreg_target(struct i2c_client *slave)
 {
 	struct at91_twi_dev *dev = i2c_get_adapdata(slave->adapter);
 
@@ -111,8 +111,8 @@ static u32 at91_twi_func(struct i2c_adapter *adapter)
 }
 
 static const struct i2c_algorithm at91_twi_algorithm_slave = {
-	.reg_slave	= at91_reg_slave,
-	.unreg_slave	= at91_unreg_slave,
+	.reg_target	= at91_reg_target,
+	.unreg_target	= at91_unreg_target,
 	.functionality	= at91_twi_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c
index a66f7f67b3b8..19545a44dbc9 100644
--- a/drivers/i2c/busses/i2c-axxia.c
+++ b/drivers/i2c/busses/i2c-axxia.c
@@ -673,7 +673,7 @@ static u32 axxia_i2c_func(struct i2c_adapter *adap)
 	return caps;
 }
 
-static int axxia_i2c_reg_slave(struct i2c_client *slave)
+static int axxia_i2c_reg_target(struct i2c_client *slave)
 {
 	struct axxia_i2c_dev *idev = i2c_get_adapdata(slave->adapter);
 	u32 slv_int_mask = SLV_STATUS_RFH;
@@ -705,7 +705,7 @@ static int axxia_i2c_reg_slave(struct i2c_client *slave)
 	return 0;
 }
 
-static int axxia_i2c_unreg_slave(struct i2c_client *slave)
+static int axxia_i2c_unreg_target(struct i2c_client *slave)
 {
 	struct axxia_i2c_dev *idev = i2c_get_adapdata(slave->adapter);
 
@@ -721,10 +721,10 @@ static int axxia_i2c_unreg_slave(struct i2c_client *slave)
 }
 
 static const struct i2c_algorithm axxia_i2c_algo = {
-	.master_xfer = axxia_i2c_xfer,
+	.xfer = axxia_i2c_xfer,
 	.functionality = axxia_i2c_func,
-	.reg_slave = axxia_i2c_reg_slave,
-	.unreg_slave = axxia_i2c_unreg_slave,
+	.reg_target = axxia_i2c_reg_target,
+	.unreg_target = axxia_i2c_unreg_target,
 };
 
 static const struct i2c_adapter_quirks axxia_i2c_quirks = {
diff --git a/drivers/i2c/busses/i2c-cros-ec-tunnel.c b/drivers/i2c/busses/i2c-cros-ec-tunnel.c
index 2737fd8abd32..4cd6a364aa3b 100644
--- a/drivers/i2c/busses/i2c-cros-ec-tunnel.c
+++ b/drivers/i2c/busses/i2c-cros-ec-tunnel.c
@@ -235,7 +235,7 @@ static u32 ec_i2c_functionality(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm ec_i2c_algorithm = {
-	.master_xfer	= ec_i2c_xfer,
+	.xfer	= ec_i2c_xfer,
 	.functionality	= ec_i2c_functionality,
 };
 
diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
index c7e56002809a..14c61b31f877 100644
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -832,7 +832,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 }
 
 static const struct i2c_algorithm i2c_dw_algo = {
-	.master_xfer = i2c_dw_xfer,
+	.xfer = i2c_dw_xfer,
 	.functionality = i2c_dw_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-designware-slave.c b/drivers/i2c/busses/i2c-designware-slave.c
index 2e079cf20bb5..b47ad6b16814 100644
--- a/drivers/i2c/busses/i2c-designware-slave.c
+++ b/drivers/i2c/busses/i2c-designware-slave.c
@@ -58,7 +58,7 @@ static int i2c_dw_init_slave(struct dw_i2c_dev *dev)
 	return 0;
 }
 
-static int i2c_dw_reg_slave(struct i2c_client *slave)
+static int i2c_dw_reg_target(struct i2c_client *slave)
 {
 	struct dw_i2c_dev *dev = i2c_get_adapdata(slave->adapter);
 
@@ -83,7 +83,7 @@ static int i2c_dw_reg_slave(struct i2c_client *slave)
 	return 0;
 }
 
-static int i2c_dw_unreg_slave(struct i2c_client *slave)
+static int i2c_dw_unreg_target(struct i2c_client *slave)
 {
 	struct dw_i2c_dev *dev = i2c_get_adapdata(slave->adapter);
 
@@ -214,8 +214,8 @@ static irqreturn_t i2c_dw_isr_slave(int this_irq, void *dev_id)
 
 static const struct i2c_algorithm i2c_dw_algo = {
 	.functionality = i2c_dw_func,
-	.reg_slave = i2c_dw_reg_slave,
-	.unreg_slave = i2c_dw_unreg_slave,
+	.reg_target = i2c_dw_reg_target,
+	.unreg_target = i2c_dw_unreg_target,
 };
 
 void i2c_dw_configure_slave(struct dw_i2c_dev *dev)
diff --git a/drivers/i2c/busses/i2c-diolan-u2c.c b/drivers/i2c/busses/i2c-diolan-u2c.c
index b48b7888936f..c02459405b26 100644
--- a/drivers/i2c/busses/i2c-diolan-u2c.c
+++ b/drivers/i2c/busses/i2c-diolan-u2c.c
@@ -414,7 +414,7 @@ static u32 diolan_usb_func(struct i2c_adapter *a)
 }
 
 static const struct i2c_algorithm diolan_usb_algorithm = {
-	.master_xfer = diolan_usb_xfer,
+	.xfer = diolan_usb_xfer,
 	.functionality = diolan_usb_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 385ef9d9e4d4..eda5f06b158d 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -852,8 +852,8 @@ static u32 exynos5_i2c_func(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm exynos5_i2c_algorithm = {
-	.master_xfer		= exynos5_i2c_xfer,
-	.master_xfer_atomic	= exynos5_i2c_xfer_atomic,
+	.xfer		= exynos5_i2c_xfer,
+	.xfer_atomic	= exynos5_i2c_xfer_atomic,
 	.functionality		= exynos5_i2c_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-gxp.c b/drivers/i2c/busses/i2c-gxp.c
index efafc0528c44..9cd29c096fe4 100644
--- a/drivers/i2c/busses/i2c-gxp.c
+++ b/drivers/i2c/busses/i2c-gxp.c
@@ -110,7 +110,7 @@ static void gxp_i2c_start(struct gxp_i2c_drvdata *drvdata)
 	writew(value, drvdata->base + GXP_I2CMCMD);
 }
 
-static int gxp_i2c_master_xfer(struct i2c_adapter *adapter,
+static int gxp_i2c_xfer(struct i2c_adapter *adapter,
 			       struct i2c_msg *msgs, int num)
 {
 	int ret;
@@ -148,7 +148,7 @@ static u32 gxp_i2c_func(struct i2c_adapter *adap)
 }
 
 #if IS_ENABLED(CONFIG_I2C_SLAVE)
-static int gxp_i2c_reg_slave(struct i2c_client *slave)
+static int gxp_i2c_reg_target(struct i2c_client *slave)
 {
 	struct gxp_i2c_drvdata *drvdata = i2c_get_adapdata(slave->adapter);
 
@@ -167,7 +167,7 @@ static int gxp_i2c_reg_slave(struct i2c_client *slave)
 	return 0;
 }
 
-static int gxp_i2c_unreg_slave(struct i2c_client *slave)
+static int gxp_i2c_unreg_target(struct i2c_client *slave)
 {
 	struct gxp_i2c_drvdata *drvdata = i2c_get_adapdata(slave->adapter);
 
@@ -184,11 +184,11 @@ static int gxp_i2c_unreg_slave(struct i2c_client *slave)
 #endif
 
 static const struct i2c_algorithm gxp_i2c_algo = {
-	.master_xfer   = gxp_i2c_master_xfer,
+	.xfer   = gxp_i2c_xfer,
 	.functionality = gxp_i2c_func,
 #if IS_ENABLED(CONFIG_I2C_SLAVE)
-	.reg_slave     = gxp_i2c_reg_slave,
-	.unreg_slave   = gxp_i2c_unreg_slave,
+	.reg_target     = gxp_i2c_reg_target,
+	.unreg_target   = gxp_i2c_unreg_target,
 #endif
 };
 
diff --git a/drivers/i2c/busses/i2c-hisi.c b/drivers/i2c/busses/i2c-hisi.c
index 975c0b1c44de..26072cef8e6e 100644
--- a/drivers/i2c/busses/i2c-hisi.c
+++ b/drivers/i2c/busses/i2c-hisi.c
@@ -197,7 +197,7 @@ static void hisi_i2c_reset_xfer(struct hisi_i2c_controller *ctlr)
  * wait for the transfer done. The major transfer process is performed
  * in the IRQ handler.
  */
-static int hisi_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
+static int hisi_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
 				int num)
 {
 	struct hisi_i2c_controller *ctlr = i2c_get_adapdata(adap);
@@ -236,7 +236,7 @@ static u32 hisi_i2c_functionality(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm hisi_i2c_algo = {
-	.master_xfer	= hisi_i2c_master_xfer,
+	.xfer	= hisi_i2c_xfer,
 	.functionality	= hisi_i2c_functionality,
 };
 
diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c
index f9d4bfef511c..89833330ec25 100644
--- a/drivers/i2c/busses/i2c-img-scb.c
+++ b/drivers/i2c/busses/i2c-img-scb.c
@@ -1146,7 +1146,7 @@ static u32 img_i2c_func(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm img_i2c_algo = {
-	.master_xfer = img_i2c_xfer,
+	.xfer = img_i2c_xfer,
 	.functionality = img_i2c_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 3842e527116b..3609d9889304 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -857,7 +857,7 @@ static void i2c_imx_slave_init(struct imx_i2c_struct *i2c_imx)
 	i2c_imx_enable_bus_idle(i2c_imx);
 }
 
-static int i2c_imx_reg_slave(struct i2c_client *client)
+static int i2c_imx_reg_target(struct i2c_client *client)
 {
 	struct imx_i2c_struct *i2c_imx = i2c_get_adapdata(client->adapter);
 	int ret;
@@ -880,7 +880,7 @@ static int i2c_imx_reg_slave(struct i2c_client *client)
 	return 0;
 }
 
-static int i2c_imx_unreg_slave(struct i2c_client *client)
+static int i2c_imx_unreg_target(struct i2c_client *client)
 {
 	struct imx_i2c_struct *i2c_imx = i2c_get_adapdata(client->adapter);
 	int ret;
@@ -1386,11 +1386,11 @@ static u32 i2c_imx_func(struct i2c_adapter *adapter)
 }
 
 static const struct i2c_algorithm i2c_imx_algo = {
-	.master_xfer = i2c_imx_xfer,
-	.master_xfer_atomic = i2c_imx_xfer_atomic,
+	.xfer = i2c_imx_xfer,
+	.xfer_atomic = i2c_imx_xfer_atomic,
 	.functionality = i2c_imx_func,
-	.reg_slave	= i2c_imx_reg_slave,
-	.unreg_slave	= i2c_imx_unreg_slave,
+	.reg_target	= i2c_imx_reg_target,
+	.unreg_target	= i2c_imx_unreg_target,
 };
 
 static int i2c_imx_probe(struct platform_device *pdev)
diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz4780.c
index 55035cca0ae5..6d2c54982bca 100644
--- a/drivers/i2c/busses/i2c-jz4780.c
+++ b/drivers/i2c/busses/i2c-jz4780.c
@@ -730,7 +730,7 @@ static u32 jz4780_i2c_functionality(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm jz4780_i2c_algorithm = {
-	.master_xfer	= jz4780_i2c_xfer,
+	.xfer	= jz4780_i2c_xfer,
 	.functionality	= jz4780_i2c_functionality,
 };
 
diff --git a/drivers/i2c/busses/i2c-kempld.c b/drivers/i2c/busses/i2c-kempld.c
index c3a529a73b5b..4fd799740242 100644
--- a/drivers/i2c/busses/i2c-kempld.c
+++ b/drivers/i2c/busses/i2c-kempld.c
@@ -276,7 +276,7 @@ static u32 kempld_i2c_func(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm kempld_i2c_algorithm = {
-	.master_xfer	= kempld_i2c_xfer,
+	.xfer	= kempld_i2c_xfer,
 	.functionality	= kempld_i2c_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-meson.c b/drivers/i2c/busses/i2c-meson.c
index c7b203cc4434..f5505904aa23 100644
--- a/drivers/i2c/busses/i2c-meson.c
+++ b/drivers/i2c/busses/i2c-meson.c
@@ -448,8 +448,8 @@ static u32 meson_i2c_func(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm meson_i2c_algorithm = {
-	.master_xfer = meson_i2c_xfer,
-	.master_xfer_atomic = meson_i2c_xfer_atomic,
+	.xfer = meson_i2c_xfer,
+	.xfer_atomic = meson_i2c_xfer_atomic,
 	.functionality = meson_i2c_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
index b3a73921ab69..cbf5e87ce6e8 100644
--- a/drivers/i2c/busses/i2c-mlxbf.c
+++ b/drivers/i2c/busses/i2c-mlxbf.c
@@ -2152,7 +2152,7 @@ static s32 mlxbf_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr,
 	return mlxbf_i2c_smbus_start_transaction(priv, &request);
 }
 
-static int mlxbf_i2c_reg_slave(struct i2c_client *slave)
+static int mlxbf_i2c_reg_target(struct i2c_client *slave)
 {
 	struct mlxbf_i2c_priv *priv = i2c_get_adapdata(slave->adapter);
 	struct device *dev = &slave->dev;
@@ -2174,7 +2174,7 @@ static int mlxbf_i2c_reg_slave(struct i2c_client *slave)
 	return 0;
 }
 
-static int mlxbf_i2c_unreg_slave(struct i2c_client *slave)
+static int mlxbf_i2c_unreg_target(struct i2c_client *slave)
 {
 	struct mlxbf_i2c_priv *priv = i2c_get_adapdata(slave->adapter);
 	struct device *dev = &slave->dev;
@@ -2232,8 +2232,8 @@ static struct mlxbf_i2c_chip_info mlxbf_i2c_chip[] = {
 static const struct i2c_algorithm mlxbf_i2c_algo = {
 	.smbus_xfer = mlxbf_i2c_smbus_xfer,
 	.functionality = mlxbf_i2c_functionality,
-	.reg_slave = mlxbf_i2c_reg_slave,
-	.unreg_slave = mlxbf_i2c_unreg_slave,
+	.reg_target = mlxbf_i2c_reg_target,
+	.unreg_target = mlxbf_i2c_unreg_target,
 };
 
 static struct i2c_adapter_quirks mlxbf_i2c_quirks = {
diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
index a8b5719c3372..4c67f5f94f11 100644
--- a/drivers/i2c/busses/i2c-mt65xx.c
+++ b/drivers/i2c/busses/i2c-mt65xx.c
@@ -1345,7 +1345,7 @@ static u32 mtk_i2c_functionality(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm mtk_i2c_algorithm = {
-	.master_xfer = mtk_i2c_transfer,
+	.xfer = mtk_i2c_transfer,
 	.functionality = mtk_i2c_functionality,
 };
 
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 36def0a9c95c..955d275676d1 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -687,7 +687,7 @@ static irqreturn_t mxs_i2c_isr(int this_irq, void *dev_id)
 }
 
 static const struct i2c_algorithm mxs_i2c_algo = {
-	.master_xfer = mxs_i2c_xfer,
+	.xfer = mxs_i2c_xfer,
 	.functionality = mxs_i2c_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index b10574d42b7a..41cded3b017e 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -934,7 +934,7 @@ static unsigned int nmk_i2c_functionality(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm nmk_i2c_algo = {
-	.master_xfer	= nmk_i2c_xfer,
+	.xfer	= nmk_i2c_xfer,
 	.functionality	= nmk_i2c_functionality
 };
 
diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c
index 2fe68615942e..6259cd70939e 100644
--- a/drivers/i2c/busses/i2c-npcm7xx.c
+++ b/drivers/i2c/busses/i2c-npcm7xx.c
@@ -1257,7 +1257,7 @@ static irqreturn_t npcm_i2c_int_slave_handler(struct npcm_i2c *bus)
 	return IRQ_HANDLED;
 }
 
-static int npcm_i2c_reg_slave(struct i2c_client *client)
+static int npcm_i2c_reg_target(struct i2c_client *client)
 {
 	unsigned long lock_flags;
 	struct npcm_i2c *bus = i2c_get_adapdata(client->adapter);
@@ -1290,7 +1290,7 @@ static int npcm_i2c_reg_slave(struct i2c_client *client)
 	return 0;
 }
 
-static int npcm_i2c_unreg_slave(struct i2c_client *client)
+static int npcm_i2c_unreg_target(struct i2c_client *client)
 {
 	struct npcm_i2c *bus = client->adapter->algo_data;
 	unsigned long lock_flags;
@@ -2075,7 +2075,7 @@ static bool npcm_i2c_master_start_xmit(struct npcm_i2c *bus,
 	return true;
 }
 
-static int npcm_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
+static int npcm_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
 				int num)
 {
 	struct npcm_i2c *bus = container_of(adap, struct npcm_i2c, adap);
@@ -2238,11 +2238,11 @@ static const struct i2c_adapter_quirks npcm_i2c_quirks = {
 };
 
 static const struct i2c_algorithm npcm_i2c_algo = {
-	.master_xfer = npcm_i2c_master_xfer,
+	.xfer = npcm_i2c_xfer,
 	.functionality = npcm_i2c_functionality,
 #if IS_ENABLED(CONFIG_I2C_SLAVE)
-	.reg_slave	= npcm_i2c_reg_slave,
-	.unreg_slave	= npcm_i2c_unreg_slave,
+	.reg_target	= npcm_i2c_reg_target,
+	.unreg_target	= npcm_i2c_unreg_target,
 #endif
 };
 
diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
index 26622d24bb1b..6d5329d6ddd8 100644
--- a/drivers/i2c/busses/i2c-nvidia-gpu.c
+++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
@@ -163,7 +163,7 @@ static int gpu_i2c_write(struct gpu_i2c_dev *i2cd, u8 data)
 	return gpu_i2c_check_status(i2cd);
 }
 
-static int gpu_i2c_master_xfer(struct i2c_adapter *adap,
+static int gpu_i2c_xfer(struct i2c_adapter *adap,
 			       struct i2c_msg *msgs, int num)
 {
 	struct gpu_i2c_dev *i2cd = i2c_get_adapdata(adap);
@@ -234,7 +234,7 @@ static u32 gpu_i2c_functionality(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm gpu_i2c_algorithm = {
-	.master_xfer	= gpu_i2c_master_xfer,
+	.xfer	= gpu_i2c_xfer,
 	.functionality	= gpu_i2c_functionality,
 };
 
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index e106af83cef4..17551d33d5b0 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -455,8 +455,8 @@ static u32 ocores_func(struct i2c_adapter *adap)
 }
 
 static struct i2c_algorithm ocores_algorithm = {
-	.master_xfer = ocores_xfer,
-	.master_xfer_atomic = ocores_xfer_polling,
+	.xfer = ocores_xfer,
+	.xfer_atomic = ocores_xfer_polling,
 	.functionality = ocores_func,
 };
 
@@ -689,13 +689,13 @@ static int ocores_i2c_probe(struct platform_device *pdev)
 	}
 
 	if (irq == -ENXIO) {
-		ocores_algorithm.master_xfer = ocores_xfer_polling;
+		ocores_algorithm.xfer = ocores_xfer_polling;
 	} else {
 		if (irq < 0)
 			return irq;
 	}
 
-	if (ocores_algorithm.master_xfer != ocores_xfer_polling) {
+	if (ocores_algorithm.xfer != ocores_xfer_polling) {
 		ret = devm_request_any_context_irq(&pdev->dev, irq,
 						   ocores_isr, 0,
 						   pdev->name, i2c);
diff --git a/drivers/i2c/busses/i2c-octeon-platdrv.c b/drivers/i2c/busses/i2c-octeon-platdrv.c
index 7d54b3203f71..dc6dff95c68c 100644
--- a/drivers/i2c/busses/i2c-octeon-platdrv.c
+++ b/drivers/i2c/busses/i2c-octeon-platdrv.c
@@ -122,7 +122,7 @@ static u32 octeon_i2c_functionality(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm octeon_i2c_algo = {
-	.master_xfer = octeon_i2c_xfer,
+	.xfer = octeon_i2c_xfer,
 	.functionality = octeon_i2c_functionality,
 };
 
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 42165ef57946..3b9ae8e522e2 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1212,8 +1212,8 @@ omap_i2c_isr_thread(int this_irq, void *dev_id)
 }
 
 static const struct i2c_algorithm omap_i2c_algo = {
-	.master_xfer	= omap_i2c_xfer_irq,
-	.master_xfer_atomic	= omap_i2c_xfer_polling,
+	.xfer	= omap_i2c_xfer_irq,
+	.xfer_atomic	= omap_i2c_xfer_polling,
 	.functionality	= omap_i2c_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-opal.c b/drivers/i2c/busses/i2c-opal.c
index 17ef87d50f7c..b6640d8e77af 100644
--- a/drivers/i2c/busses/i2c-opal.c
+++ b/drivers/i2c/busses/i2c-opal.c
@@ -70,7 +70,7 @@ static int i2c_opal_send_request(u32 bus_id, struct opal_i2c_request *req)
 	return rc;
 }
 
-static int i2c_opal_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
+static int i2c_opal_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
 				int num)
 {
 	unsigned long opal_id = (unsigned long)adap->algo_data;
@@ -179,7 +179,7 @@ static u32 i2c_opal_func(struct i2c_adapter *adapter)
 }
 
 static const struct i2c_algorithm i2c_opal_algo = {
-	.master_xfer	= i2c_opal_master_xfer,
+	.xfer	= i2c_opal_xfer,
 	.smbus_xfer	= i2c_opal_smbus_xfer,
 	.functionality	= i2c_opal_func,
 };
diff --git a/drivers/i2c/busses/i2c-pasemi-core.c b/drivers/i2c/busses/i2c-pasemi-core.c
index bd8becbdeeb2..b07bf8286a47 100644
--- a/drivers/i2c/busses/i2c-pasemi-core.c
+++ b/drivers/i2c/busses/i2c-pasemi-core.c
@@ -336,7 +336,7 @@ static u32 pasemi_smb_func(struct i2c_adapter *adapter)
 }
 
 static const struct i2c_algorithm smbus_algorithm = {
-	.master_xfer	= pasemi_i2c_xfer,
+	.xfer	= pasemi_i2c_xfer,
 	.smbus_xfer	= pasemi_smb_xfer,
 	.functionality	= pasemi_smb_func,
 };
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index a12525b3186b..e31ac2dbbd7b 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -609,7 +609,7 @@ static u32 i2c_pnx_func(struct i2c_adapter *adapter)
 }
 
 static const struct i2c_algorithm pnx_algorithm = {
-	.master_xfer = i2c_pnx_xfer,
+	.xfer = i2c_pnx_xfer,
 	.functionality = i2c_pnx_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 76f79b68cef8..474abc4f5784 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1154,11 +1154,11 @@ static u32 i2c_pxa_functionality(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm i2c_pxa_algorithm = {
-	.master_xfer	= i2c_pxa_xfer,
+	.xfer	= i2c_pxa_xfer,
 	.functionality	= i2c_pxa_functionality,
 #ifdef CONFIG_I2C_PXA_SLAVE
-	.reg_slave	= i2c_pxa_slave_reg,
-	.unreg_slave	= i2c_pxa_slave_unreg,
+	.reg_target	= i2c_pxa_slave_reg,
+	.unreg_target	= i2c_pxa_slave_unreg,
 #endif
 };
 
@@ -1244,11 +1244,11 @@ static int i2c_pxa_pio_xfer(struct i2c_adapter *adap,
 }
 
 static const struct i2c_algorithm i2c_pxa_pio_algorithm = {
-	.master_xfer	= i2c_pxa_pio_xfer,
+	.xfer	= i2c_pxa_pio_xfer,
 	.functionality	= i2c_pxa_functionality,
 #ifdef CONFIG_I2C_PXA_SLAVE
-	.reg_slave	= i2c_pxa_slave_reg,
-	.unreg_slave	= i2c_pxa_slave_unreg,
+	.reg_target	= i2c_pxa_slave_reg,
+	.unreg_target	= i2c_pxa_slave_unreg,
 #endif
 };
 
diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c
index 414882c57d7f..d8d6d99dd4e7 100644
--- a/drivers/i2c/busses/i2c-qcom-cci.c
+++ b/drivers/i2c/busses/i2c-qcom-cci.c
@@ -463,7 +463,7 @@ static u32 cci_func(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm cci_algo = {
-	.master_xfer	= cci_xfer,
+	.xfer	= cci_xfer,
 	.functionality	= cci_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index da94df466e83..337a80089f43 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -715,7 +715,7 @@ static u32 geni_i2c_func(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm geni_i2c_algo = {
-	.master_xfer	= geni_i2c_xfer,
+	.xfer	= geni_i2c_xfer,
 	.functionality	= geni_i2c_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-robotfuzz-osif.c b/drivers/i2c/busses/i2c-robotfuzz-osif.c
index 66dfa211e736..40985a38bec0 100644
--- a/drivers/i2c/busses/i2c-robotfuzz-osif.c
+++ b/drivers/i2c/busses/i2c-robotfuzz-osif.c
@@ -112,7 +112,7 @@ static u32 osif_func(struct i2c_adapter *adapter)
 }
 
 static const struct i2c_algorithm osif_algorithm = {
-	.master_xfer	= osif_xfer,
+	.xfer	= osif_xfer,
 	.functionality	= osif_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-rzv2m.c b/drivers/i2c/busses/i2c-rzv2m.c
index b0bfc96b9ede..60aa0a4e4247 100644
--- a/drivers/i2c/busses/i2c-rzv2m.c
+++ b/drivers/i2c/busses/i2c-rzv2m.c
@@ -321,7 +321,7 @@ static int rzv2m_i2c_stop_condition(struct rzv2m_i2c_priv *priv)
 				  100, jiffies_to_usecs(priv->adap.timeout));
 }
 
-static int rzv2m_i2c_master_xfer_msg(struct rzv2m_i2c_priv *priv,
+static int rzv2m_i2c_xfer_msg(struct rzv2m_i2c_priv *priv,
 				  struct i2c_msg *msg, int stop)
 {
 	unsigned int count = 0;
@@ -351,7 +351,7 @@ static int rzv2m_i2c_master_xfer_msg(struct rzv2m_i2c_priv *priv,
 	return ret;
 }
 
-static int rzv2m_i2c_master_xfer(struct i2c_adapter *adap,
+static int rzv2m_i2c_xfer(struct i2c_adapter *adap,
 				 struct i2c_msg *msgs, int num)
 {
 	struct rzv2m_i2c_priv *priv = i2c_get_adapdata(adap);
@@ -370,7 +370,7 @@ static int rzv2m_i2c_master_xfer(struct i2c_adapter *adap,
 
 	/* I2C main transfer */
 	for (i = 0; i < num; i++) {
-		ret = rzv2m_i2c_master_xfer_msg(priv, &msgs[i], i == (num - 1));
+		ret = rzv2m_i2c_xfer_msg(priv, &msgs[i], i == (num - 1));
 		if (ret < 0)
 			goto out;
 	}
@@ -408,7 +408,7 @@ static const struct i2c_adapter_quirks rzv2m_i2c_quirks = {
 };
 
 static struct i2c_algorithm rzv2m_i2c_algo = {
-	.master_xfer = rzv2m_i2c_master_xfer,
+	.xfer = rzv2m_i2c_xfer,
 	.functionality = rzv2m_i2c_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 275f7c42165c..29f5fef39b54 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -800,8 +800,8 @@ static u32 s3c24xx_i2c_func(struct i2c_adapter *adap)
 
 /* i2c bus registration info */
 static const struct i2c_algorithm s3c24xx_i2c_algorithm = {
-	.master_xfer		= s3c24xx_i2c_xfer,
-	.master_xfer_atomic     = s3c24xx_i2c_xfer_atomic,
+	.xfer		= s3c24xx_i2c_xfer,
+	.xfer_atomic     = s3c24xx_i2c_xfer_atomic,
 	.functionality		= s3c24xx_i2c_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index 01210452216b..6ecaafc700bc 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -1065,7 +1065,7 @@ static int stm32f7_i2c_smbus_xfer_msg(struct stm32f7_i2c_dev *i2c_dev,
 		f7_msg->read_write = I2C_SMBUS_READ;
 		break;
 	case I2C_SMBUS_I2C_BLOCK_DATA:
-		/* Rely on emulated i2c transfer (through master_xfer) */
+		/* Rely on emulated i2c transfer (through xfer) */
 		return -EOPNOTSUPP;
 	default:
 		dev_err(dev, "Unsupported smbus protocol %d\n", f7_msg->size);
@@ -1888,7 +1888,7 @@ static void stm32f7_i2c_enable_wakeup(struct stm32f7_i2c_dev *i2c_dev,
 	}
 }
 
-static int stm32f7_i2c_reg_slave(struct i2c_client *slave)
+static int stm32f7_i2c_reg_target(struct i2c_client *slave)
 {
 	struct stm32f7_i2c_dev *i2c_dev = i2c_get_adapdata(slave->adapter);
 	void __iomem *base = i2c_dev->base;
@@ -1978,7 +1978,7 @@ static int stm32f7_i2c_reg_slave(struct i2c_client *slave)
 	return ret;
 }
 
-static int stm32f7_i2c_unreg_slave(struct i2c_client *slave)
+static int stm32f7_i2c_unreg_target(struct i2c_client *slave)
 {
 	struct stm32f7_i2c_dev *i2c_dev = i2c_get_adapdata(slave->adapter);
 	void __iomem *base = i2c_dev->base;
@@ -2151,12 +2151,12 @@ static u32 stm32f7_i2c_func(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm stm32f7_i2c_algo = {
-	.master_xfer = stm32f7_i2c_xfer,
-	.master_xfer_atomic = stm32f7_i2c_xfer_atomic,
+	.xfer = stm32f7_i2c_xfer,
+	.xfer_atomic = stm32f7_i2c_xfer_atomic,
 	.smbus_xfer = stm32f7_i2c_smbus_xfer,
 	.functionality = stm32f7_i2c_func,
-	.reg_slave = stm32f7_i2c_reg_slave,
-	.unreg_slave = stm32f7_i2c_unreg_slave,
+	.reg_target = stm32f7_i2c_reg_target,
+	.unreg_target = stm32f7_i2c_unreg_target,
 };
 
 static int stm32f7_i2c_probe(struct platform_device *pdev)
diff --git a/drivers/i2c/busses/i2c-tegra-bpmp.c b/drivers/i2c/busses/i2c-tegra-bpmp.c
index b0840fa0f53e..dabadbcc6d6a 100644
--- a/drivers/i2c/busses/i2c-tegra-bpmp.c
+++ b/drivers/i2c/busses/i2c-tegra-bpmp.c
@@ -275,8 +275,8 @@ static u32 tegra_bpmp_i2c_func(struct i2c_adapter *adapter)
 }
 
 static const struct i2c_algorithm tegra_bpmp_i2c_algo = {
-	.master_xfer = tegra_bpmp_i2c_xfer,
-	.master_xfer_atomic = tegra_bpmp_i2c_xfer_atomic,
+	.xfer = tegra_bpmp_i2c_xfer,
+	.xfer_atomic = tegra_bpmp_i2c_xfer_atomic,
 	.functionality = tegra_bpmp_i2c_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 920d5a8cbf4c..861b1c9e2627 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -1437,8 +1437,8 @@ static u32 tegra_i2c_func(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm tegra_i2c_algo = {
-	.master_xfer		= tegra_i2c_xfer,
-	.master_xfer_atomic	= tegra_i2c_xfer_atomic,
+	.xfer		= tegra_i2c_xfer,
+	.xfer_atomic	= tegra_i2c_xfer_atomic,
 	.functionality		= tegra_i2c_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-thunderx-pcidrv.c b/drivers/i2c/busses/i2c-thunderx-pcidrv.c
index a77cd86fe75e..de325c8e18f3 100644
--- a/drivers/i2c/busses/i2c-thunderx-pcidrv.c
+++ b/drivers/i2c/busses/i2c-thunderx-pcidrv.c
@@ -71,7 +71,7 @@ static u32 thunderx_i2c_functionality(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm thunderx_i2c_algo = {
-	.master_xfer = octeon_i2c_xfer,
+	.xfer = octeon_i2c_xfer,
 	.functionality = thunderx_i2c_functionality,
 };
 
diff --git a/drivers/i2c/busses/i2c-virtio.c b/drivers/i2c/busses/i2c-virtio.c
index c60ae531ba57..52ba1e0845ca 100644
--- a/drivers/i2c/busses/i2c-virtio.c
+++ b/drivers/i2c/busses/i2c-virtio.c
@@ -183,7 +183,7 @@ static u32 virtio_i2c_func(struct i2c_adapter *adap)
 }
 
 static struct i2c_algorithm virtio_algorithm = {
-	.master_xfer = virtio_i2c_xfer,
+	.xfer = virtio_i2c_xfer,
 	.functionality = virtio_i2c_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-wmt.c b/drivers/i2c/busses/i2c-wmt.c
index 198afee5233c..05ff6228c2dd 100644
--- a/drivers/i2c/busses/i2c-wmt.c
+++ b/drivers/i2c/busses/i2c-wmt.c
@@ -269,7 +269,7 @@ static u32 wmt_i2c_func(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm wmt_i2c_algo = {
-	.master_xfer	= wmt_i2c_xfer,
+	.xfer	= wmt_i2c_xfer,
 	.functionality	= wmt_i2c_func,
 };
 
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index 71391b590ada..7ff36df7319e 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -1193,7 +1193,7 @@ static u32 xiic_func(struct i2c_adapter *adap)
 }
 
 static const struct i2c_algorithm xiic_algorithm = {
-	.master_xfer = xiic_xfer,
+	.xfer = xiic_xfer,
 	.functionality = xiic_func,
 };
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification
  2024-03-22 13:25 ` [PATCH 64/64] i2c: reword i2c_algorithm in drivers " Wolfram Sang
@ 2024-03-22 14:34   ` Bjorn Andersson
  2024-03-22 15:11   ` Nicolas Ferre
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 20+ messages in thread
From: Bjorn Andersson @ 2024-03-22 14:34 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Elie Morisse, Shyam Sundar S K, Andi Shyti,
	Codrin Ciubotariu, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, Krzysztof Adamski, Benson Leung, Guenter Roeck,
	Jarkko Nikula, Andy Shevchenko, Mika Westerberg, Jan Dabros,
	Krzysztof Kozlowski, Alim Akhtar, Jean-Marie Verdun,
	Nick Hawkins, Yicong Yang, Oleksij Rempel,
	Pengutronix Kernel Team, Shawn Guo, Sascha Hauer, Fabio Estevam,
	Paul Cercueil, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Khalil Blaiech, Asmaa Mnebhi, Qii Wang,
	Matthias Brugger, AngeloGioacchino Del Regno, Linus Walleij,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Ajay Gupta, Peter Korsgaard,
	Andrew Lunn, Robert Richter, Aaro Koskinen, Janusz Krzysztofik,
	Tony Lindgren, Vignesh R, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Aneesh Kumar K.V, Naveen N. Rao, Hector Martin,
	Sven Peter, Alyssa Rosenzweig, Vladimir Zapolskiy, Loic Poulain,
	Robert Foss, Konrad Dybcio, Fabrizio Castro, Pierre-Yves MORDRET,
	Alain Volmat, Maxime Coquelin, Alexandre Torgue, Thierry Reding,
	Jonathan Hunter, Laxman Dewangan, Dmitry Osipenko, Conghui Chen,
	Viresh Kumar, Michal Simek, linux-kernel, linux-arm-kernel,
	chrome-platform, linux-samsung-soc, imx, linux-mips,
	linux-amlogic, linux-mediatek, openbmc, linux-omap, linuxppc-dev,
	asahi, linux-arm-msm, linux-renesas-soc, linux-stm32,
	linux-tegra, virtualization

On Fri, Mar 22, 2024 at 02:25:57PM +0100, Wolfram Sang wrote:
> Match the wording in i2c_algorithm in I2C drivers wrt. the newest I2C
> v7, SMBus 3.2, I3C specifications and replace "master/slave" with more
> appropriate terms. For some drivers, this means no more conversions are
> needed. For the others more work needs to be done but this will be
> performed incrementally along with API changes/improvements. All these
> changes here are simple search/replace results.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Bjorn Andersson <andersson@kernel.org>

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification
  2024-03-22 13:25 ` [PATCH 64/64] i2c: reword i2c_algorithm in drivers " Wolfram Sang
  2024-03-22 14:34   ` Bjorn Andersson
@ 2024-03-22 15:11   ` Nicolas Ferre
  2024-03-22 16:47     ` Wolfram Sang
  2024-03-22 16:09   ` Andy Shevchenko
                     ` (3 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Nicolas Ferre @ 2024-03-22 15:11 UTC (permalink / raw)
  To: Wolfram Sang, linux-i2c
  Cc: Elie Morisse, Shyam Sundar S K, Andi Shyti, Codrin Ciubotariu,
	Alexandre Belloni, Claudiu Beznea, Krzysztof Adamski,
	Benson Leung, Guenter Roeck, Jarkko Nikula, Andy Shevchenko,
	Mika Westerberg, Jan Dabros, Krzysztof Kozlowski, Alim Akhtar,
	Jean-Marie Verdun, Nick Hawkins, Yicong Yang, Oleksij Rempel,
	Pengutronix Kernel Team, Shawn Guo, Sascha Hauer, Fabio Estevam,
	Paul Cercueil, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Khalil Blaiech, Asmaa Mnebhi, Qii Wang,
	Matthias Brugger, AngeloGioacchino Del Regno, Linus Walleij,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Ajay Gupta, Peter Korsgaard,
	Andrew Lunn, Robert Richter, Aaro Koskinen, Janusz Krzysztofik,
	Tony Lindgren, Vignesh R, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Aneesh Kumar K.V, Naveen N. Rao, Hector Martin,
	Sven Peter, Alyssa Rosenzweig, Vladimir Zapolskiy, Loic Poulain,
	Robert Foss, Bjorn Andersson, Konrad Dybcio, Fabrizio Castro,
	Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Thierry Reding, Jonathan Hunter,
	Laxman Dewangan, Dmitry Osipenko, Conghui Chen, Viresh Kumar,
	Michal Simek, linux-kernel, linux-arm-kernel, chrome-platform,
	linux-samsung-soc, imx, linux-mips, linux-amlogic,
	linux-mediatek, openbmc, linux-omap, linuxppc-dev, asahi,
	linux-arm-msm, linux-renesas-soc, linux-stm32, linux-tegra,
	virtualization, Ryan Wanner

On 22/03/2024 at 14:25, Wolfram Sang wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Match the wording in i2c_algorithm in I2C drivers wrt. the newest I2C
> v7, SMBus 3.2, I3C specifications and replace "master/slave" with more
> appropriate terms. For some drivers, this means no more conversions are
> needed. For the others more work needs to be done but this will be
> performed incrementally along with API changes/improvements. All these
> changes here are simple search/replace results.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---

[..]

>   drivers/i2c/busses/i2c-at91-master.c       |  2 +-
>   drivers/i2c/busses/i2c-at91-slave.c        |  8 ++++----

[..]

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> # for at91
Probably file names themselves will need some care, in a second time.

Thanks. Regards,
   Nicolas

[..]

> --
> 2.43.0
> 


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification
  2024-03-22 13:25 ` [PATCH 64/64] i2c: reword i2c_algorithm in drivers " Wolfram Sang
  2024-03-22 14:34   ` Bjorn Andersson
  2024-03-22 15:11   ` Nicolas Ferre
@ 2024-03-22 16:09   ` Andy Shevchenko
  2024-03-22 16:48     ` Wolfram Sang
  2024-03-25  7:45   ` Oleksij Rempel
                     ` (2 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Andy Shevchenko @ 2024-03-22 16:09 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Andi Shyti, Krzysztof Kozlowski, linux-arm-kernel,
	chrome-platform, linux-samsung-soc, imx, linux-mips,
	linux-amlogic, linux-mediatek, openbmc, linux-omap, linuxppc-dev,
	asahi, linux-arm-msm, linux-renesas-soc, linux-stm32,
	linux-tegra, virtualization

On Fri, Mar 22, 2024 at 02:25:57PM +0100, Wolfram Sang wrote:
> Match the wording in i2c_algorithm in I2C drivers wrt. the newest I2C
> v7, SMBus 3.2, I3C specifications and replace "master/slave" with more
> appropriate terms. For some drivers, this means no more conversions are
> needed. For the others more work needs to be done but this will be
> performed incrementally along with API changes/improvements. All these
> changes here are simple search/replace results.

...

>  static const struct i2c_algorithm at91_twi_algorithm = {
> -	.master_xfer	= at91_twi_xfer,
> +	.xfer	= at91_twi_xfer,

Seems you made this by a script, can you check the indentations afterwards?

>  	.functionality	= at91_twi_func,
>  };

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification
  2024-03-22 15:11   ` Nicolas Ferre
@ 2024-03-22 16:47     ` Wolfram Sang
  2024-03-22 17:05       ` Guenter Roeck
  0 siblings, 1 reply; 20+ messages in thread
From: Wolfram Sang @ 2024-03-22 16:47 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: linux-i2c, Elie Morisse, Shyam Sundar S K, Andi Shyti,
	Codrin Ciubotariu, Alexandre Belloni, Claudiu Beznea,
	Krzysztof Adamski, Benson Leung, Guenter Roeck, Jarkko Nikula,
	Andy Shevchenko, Mika Westerberg, Jan Dabros,
	Krzysztof Kozlowski, Alim Akhtar, Jean-Marie Verdun,
	Nick Hawkins, Yicong Yang, Oleksij Rempel,
	Pengutronix Kernel Team, Shawn Guo, Sascha Hauer, Fabio Estevam,
	Paul Cercueil, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Khalil Blaiech, Asmaa Mnebhi, Qii Wang,
	Matthias Brugger, AngeloGioacchino Del Regno, Linus Walleij,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Ajay Gupta, Peter Korsgaard,
	Andrew Lunn, Robert Richter, Aaro Koskinen, Janusz Krzysztofik,
	Tony Lindgren, Vignesh R, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Aneesh Kumar K.V, Naveen N. Rao, Hector Martin,
	Sven Peter, Alyssa Rosenzweig, Vladimir Zapolskiy, Loic Poulain,
	Robert Foss, Bjorn Andersson, Konrad Dybcio, Fabrizio Castro,
	Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Thierry Reding, Jonathan Hunter,
	Laxman Dewangan, Dmitry Osipenko, Conghui Chen, Viresh Kumar,
	Michal Simek, linux-kernel, linux-arm-kernel, chrome-platform,
	linux-samsung-soc, imx, linux-mips, linux-amlogic,
	linux-mediatek, openbmc, linux-omap, linuxppc-dev, asahi,
	linux-arm-msm, linux-renesas-soc, linux-stm32, linux-tegra,
	virtualization, Ryan Wanner

[-- Attachment #1: Type: text/plain, Size: 208 bytes --]


> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> # for at91
> Probably file names themselves will need some care, in a second time.

Totally true. I am aware of that. But one step after the other...


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification
  2024-03-22 16:09   ` Andy Shevchenko
@ 2024-03-22 16:48     ` Wolfram Sang
  2024-03-22 17:00       ` Andy Shevchenko
  0 siblings, 1 reply; 20+ messages in thread
From: Wolfram Sang @ 2024-03-22 16:48 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-i2c, Andi Shyti, Krzysztof Kozlowski, linux-arm-kernel,
	chrome-platform, linux-samsung-soc, imx, linux-mips,
	linux-amlogic, linux-mediatek, openbmc, linux-omap, linuxppc-dev,
	asahi, linux-arm-msm, linux-renesas-soc, linux-stm32,
	linux-tegra, virtualization

[-- Attachment #1: Type: text/plain, Size: 351 bytes --]


> >  static const struct i2c_algorithm at91_twi_algorithm = {
> > -	.master_xfer	= at91_twi_xfer,
> > +	.xfer	= at91_twi_xfer,
> 
> Seems you made this by a script, can you check the indentations afterwards?

Yes, I noticed as well. But other (not converted) drivers have issues
there as well, so this will be a seperate patch.

Thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification
  2024-03-22 16:48     ` Wolfram Sang
@ 2024-03-22 17:00       ` Andy Shevchenko
  0 siblings, 0 replies; 20+ messages in thread
From: Andy Shevchenko @ 2024-03-22 17:00 UTC (permalink / raw)
  To: Wolfram Sang, linux-i2c, Andi Shyti, Krzysztof Kozlowski,
	linux-arm-kernel, chrome-platform, linux-samsung-soc, imx,
	linux-mips, linux-amlogic, linux-mediatek, openbmc, linux-omap,
	linuxppc-dev, asahi, linux-arm-msm, linux-renesas-soc,
	linux-stm32, linux-tegra, virtualization

On Fri, Mar 22, 2024 at 05:48:54PM +0100, Wolfram Sang wrote:
> 
> > >  static const struct i2c_algorithm at91_twi_algorithm = {
> > > -	.master_xfer	= at91_twi_xfer,
> > > +	.xfer	= at91_twi_xfer,
> > 
> > Seems you made this by a script, can you check the indentations afterwards?
> 
> Yes, I noticed as well. But other (not converted) drivers have issues
> there as well, so this will be a seperate patch.

The problem is that you add to a technical debt. We don't want that.
If you have not introduced a new indentation issue, it obviously is
not needed to be fixed in a separate patch. So, please consider this.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification
  2024-03-22 16:47     ` Wolfram Sang
@ 2024-03-22 17:05       ` Guenter Roeck
  2024-03-22 17:09         ` Wolfram Sang
  0 siblings, 1 reply; 20+ messages in thread
From: Guenter Roeck @ 2024-03-22 17:05 UTC (permalink / raw)
  To: Wolfram Sang, Nicolas Ferre, linux-i2c, Elie Morisse,
	Shyam Sundar S K, Andi Shyti, Codrin Ciubotariu,
	Alexandre Belloni, Claudiu Beznea, Krzysztof Adamski,
	Benson Leung, Guenter Roeck, Jarkko Nikula, Andy Shevchenko,
	Mika Westerberg, Jan Dabros, Krzysztof Kozlowski, Alim Akhtar,
	Jean-Marie Verdun, Nick Hawkins, Yicong Yang, Oleksij Rempel,
	Pengutronix Kernel Team, Shawn Guo, Sascha Hauer, Fabio Estevam,
	Paul Cercueil, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Khalil Blaiech, Asmaa Mnebhi, Qii Wang,
	Matthias Brugger, AngeloGioacchino Del Regno, Linus Walleij,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Ajay Gupta, Peter Korsgaard,
	Andrew Lunn, Robert Richter, Aaro Koskinen, Janusz Krzysztofik,
	Tony Lindgren, Vignesh R, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Aneesh Kumar K.V, Naveen N. Rao, Hector Martin,
	Sven Peter, Alyssa Rosenzweig, Vladimir Zapolskiy, Loic Poulain,
	Robert Foss, Bjorn Andersson, Konrad Dybcio, Fabrizio Castro,
	Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Thierry Reding, Jonathan Hunter,
	Laxman Dewangan, Dmitry Osipenko, Conghui Chen, Viresh Kumar,
	Michal Simek, linux-kernel, linux-arm-kernel, chrome-platform,
	linux-samsung-soc, imx, linux-mips, linux-amlogic,
	linux-mediatek, openbmc, linux-omap, linuxppc-dev, asahi,
	linux-arm-msm, linux-renesas-soc, linux-stm32, linux-tegra,
	virtualization, Ryan Wanner

On Fri, Mar 22, 2024 at 9:47 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
>
> > Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> # for at91
> > Probably file names themselves will need some care, in a second time.
>
> Totally true. I am aware of that. But one step after the other...
>

Kind of odd though to change function names but not parameter names of
those very same functions.

Guenter

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification
  2024-03-22 17:05       ` Guenter Roeck
@ 2024-03-22 17:09         ` Wolfram Sang
  0 siblings, 0 replies; 20+ messages in thread
From: Wolfram Sang @ 2024-03-22 17:09 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Nicolas Ferre, linux-i2c, Elie Morisse, Shyam Sundar S K,
	Andi Shyti, Codrin Ciubotariu, Alexandre Belloni, Claudiu Beznea,
	Krzysztof Adamski, Benson Leung, Guenter Roeck, Jarkko Nikula,
	Andy Shevchenko, Mika Westerberg, Jan Dabros,
	Krzysztof Kozlowski, Alim Akhtar, Jean-Marie Verdun,
	Nick Hawkins, Yicong Yang, Oleksij Rempel,
	Pengutronix Kernel Team, Shawn Guo, Sascha Hauer, Fabio Estevam,
	Paul Cercueil, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Khalil Blaiech, Asmaa Mnebhi, Qii Wang,
	Matthias Brugger, AngeloGioacchino Del Regno, Linus Walleij,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Ajay Gupta, Peter Korsgaard,
	Andrew Lunn, Robert Richter, Aaro Koskinen, Janusz Krzysztofik,
	Tony Lindgren, Vignesh R, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Aneesh Kumar K.V, Naveen N. Rao, Hector Martin,
	Sven Peter, Alyssa Rosenzweig, Vladimir Zapolskiy, Loic Poulain,
	Robert Foss, Bjorn Andersson, Konrad Dybcio, Fabrizio Castro,
	Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Thierry Reding, Jonathan Hunter,
	Laxman Dewangan, Dmitry Osipenko, Conghui Chen, Viresh Kumar,
	Michal Simek, linux-kernel, linux-arm-kernel, chrome-platform,
	linux-samsung-soc, imx, linux-mips, linux-amlogic,
	linux-mediatek, openbmc, linux-omap, linuxppc-dev, asahi,
	linux-arm-msm, linux-renesas-soc, linux-stm32, linux-tegra,
	virtualization, Ryan Wanner

[-- Attachment #1: Type: text/plain, Size: 247 bytes --]


> Kind of odd though to change function names but not parameter names of
> those very same functions.

Ouch, this is definitely a valid point. Seems like this series will need
a respin after all. Will wait for further comments, though.

Thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 00/64] i2c: reword i2c_algorithm according to newest specification
  2024-03-22 13:24 [PATCH 00/64] i2c: reword i2c_algorithm according to newest specification Wolfram Sang
                   ` (4 preceding siblings ...)
  2024-03-22 13:25 ` [PATCH 64/64] i2c: reword i2c_algorithm in drivers " Wolfram Sang
@ 2024-03-23  9:20 ` Andi Shyti
  2024-03-26  0:36   ` Andi Shyti
  5 siblings, 1 reply; 20+ messages in thread
From: Andi Shyti @ 2024-03-23  9:20 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, asahi, chrome-platform, imx, linux-actions,
	linux-amlogic, linux-arm-kernel, linux-arm-msm, linux-aspeed,
	linux-kernel, linux-mediatek, linux-mips, linux-omap,
	linuxppc-dev, linux-renesas-soc, linux-riscv, linux-rockchip,
	linux-rpi-kernel, linux-samsung-soc, linux-stm32, linux-sunxi,
	linux-tegra, openbmc, virtualization

Hi Wolfram,

On Fri, Mar 22, 2024 at 02:24:53PM +0100, Wolfram Sang wrote:
> Okay, we need to begin somewhere...
> 
> Start changing the wording of the I2C main header wrt. the newest I2C
> v7, SMBus 3.2, I3C specifications and replace "master/slave" with more
> appropriate terms. This first step renames the members of struct
> i2c_algorithm. Once all in-tree users are converted, the anonymous union
> will go away again. All this work will also pave the way for finally
> seperating the monolithic header into more fine-grained headers like
> "i2c/clients.h" etc. So, this is not a simple renaming-excercise but
> also a chance to update the I2C core to recent Linux standards.

yes, very good! It's clearly stated in all three documentations
that Target replaces Slave and Controller replaces Master (i3c is
at the 1.1.1 version).

> My motivation is to improve the I2C core API, in general. My motivation
> is not to clean each and every driver. I think this is impossible
> because register names based on official documentation will need to stay
> as they are. But the Linux-internal names should be updated IMO.

Also because some drivers have been written based on previous
specifications where master/slave was used.

> That being said, I worked on 62 drivers in this series beyond plain
> renames inside 'struct i2c_algorithm' because the fruits were so
> low-hanging. Before this series, 112 files in the 'busses/' directory
> contained 'master' and/or 'slave'. After the series, only 57. Why not?
> 
> Next step is updating the drivers outside the 'i2c'-folder regarding
> 'struct i2c_algorithm' so we can remove the anonymous union ASAP. To be
> able to work on this with minimal dependencies, I'd like to apply this
> series between -rc1 and -rc2.
> 
> I hope this will work for you guys. The changes are really minimal. If
> you are not comfortable with changes to your driver or need more time to
> review, please NACK the patch and I will drop the patch and/or address
> the issues separeately.
> 
> @Andi: are you okay with this approach? It means you'd need to merge
> -rc2 into your for-next branch. Or rebase if all fails.

I think it's a good plan, I'll try to support you with it.

> Speaking of Andi, thanks a lot to him taking care of the controller
> drivers these days. His work really gives me the freedom to work on I2C
> core issues again.

Thank you, Wolfram!

Andi

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification
  2024-03-22 13:25 ` [PATCH 64/64] i2c: reword i2c_algorithm in drivers " Wolfram Sang
                     ` (2 preceding siblings ...)
  2024-03-22 16:09   ` Andy Shevchenko
@ 2024-03-25  7:45   ` Oleksij Rempel
  2024-03-25  7:53   ` Jarkko Nikula
  2024-04-02 12:35   ` Linus Walleij
  5 siblings, 0 replies; 20+ messages in thread
From: Oleksij Rempel @ 2024-03-25  7:45 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Elie Morisse, Shyam Sundar S K, Andi Shyti,
	Codrin Ciubotariu, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, Krzysztof Adamski, Benson Leung, Guenter Roeck,
	Jarkko Nikula, Andy Shevchenko, Mika Westerberg, Jan Dabros,
	Krzysztof Kozlowski, Alim Akhtar, Jean-Marie Verdun,
	Nick Hawkins, Yicong Yang, Pengutronix Kernel Team, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Paul Cercueil, Neil Armstrong,
	Kevin Hilman, Jerome Brunet, Martin Blumenstingl, Khalil Blaiech,
	Asmaa Mnebhi, Qii Wang, Matthias Brugger,
	AngeloGioacchino Del Regno, Linus Walleij, Avi Fishman,
	Tomer Maimon, Tali Perry, Patrick Venture, Nancy Yuen,
	Benjamin Fair, Ajay Gupta, Peter Korsgaard, Andrew Lunn,
	Robert Richter, Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren,
	Vignesh R, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Aneesh Kumar K.V, Naveen N. Rao, Hector Martin, Sven Peter,
	Alyssa Rosenzweig, Vladimir Zapolskiy, Loic Poulain, Robert Foss,
	Bjorn Andersson, Konrad Dybcio, Fabrizio Castro,
	Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Thierry Reding, Jonathan Hunter,
	Laxman Dewangan, Dmitry Osipenko, Conghui Chen, Viresh Kumar,
	Michal Simek, linux-kernel, linux-arm-kernel, chrome-platform,
	linux-samsung-soc, imx, linux-mips, linux-amlogic,
	linux-mediatek, openbmc, linux-omap, linuxppc-dev, asahi,
	linux-arm-msm, linux-renesas-soc, linux-stm32, linux-tegra,
	virtualization

On Fri, Mar 22, 2024 at 02:25:57PM +0100, Wolfram Sang wrote:
> Match the wording in i2c_algorithm in I2C drivers wrt. the newest I2C
> v7, SMBus 3.2, I3C specifications and replace "master/slave" with more
> appropriate terms. For some drivers, this means no more conversions are
> needed. For the others more work needs to be done but this will be
> performed incrementally along with API changes/improvements. All these
> changes here are simple search/replace results.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> # for i2c-imx.c 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification
  2024-03-22 13:25 ` [PATCH 64/64] i2c: reword i2c_algorithm in drivers " Wolfram Sang
                     ` (3 preceding siblings ...)
  2024-03-25  7:45   ` Oleksij Rempel
@ 2024-03-25  7:53   ` Jarkko Nikula
  2024-04-02 12:35   ` Linus Walleij
  5 siblings, 0 replies; 20+ messages in thread
From: Jarkko Nikula @ 2024-03-25  7:53 UTC (permalink / raw)
  To: Wolfram Sang, linux-i2c
  Cc: Elie Morisse, Shyam Sundar S K, Andi Shyti, Codrin Ciubotariu,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea,
	Krzysztof Adamski, Benson Leung, Guenter Roeck, Andy Shevchenko,
	Mika Westerberg, Jan Dabros, Krzysztof Kozlowski, Alim Akhtar,
	Jean-Marie Verdun, Nick Hawkins, Yicong Yang, Oleksij Rempel,
	Pengutronix Kernel Team, Shawn Guo, Sascha Hauer, Fabio Estevam,
	Paul Cercueil, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Khalil Blaiech, Asmaa Mnebhi, Qii Wang,
	Matthias Brugger, AngeloGioacchino Del Regno, Linus Walleij,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Ajay Gupta, Peter Korsgaard,
	Andrew Lunn, Robert Richter, Aaro Koskinen, Janusz Krzysztofik,
	Tony Lindgren, Vignesh R, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Aneesh Kumar K.V, Naveen N. Rao, Hector Martin,
	Sven Peter, Alyssa Rosenzweig, Vladimir Zapolskiy, Loic Poulain,
	Robert Foss, Bjorn Andersson, Konrad Dybcio, Fabrizio Castro,
	Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Thierry Reding, Jonathan Hunter,
	Laxman Dewangan, Dmitry Osipenko, Conghui Chen, Viresh Kumar,
	Michal Simek, linux-kernel, linux-arm-kernel, chrome-platform,
	linux-samsung-soc, imx, linux-mips, linux-amlogic,
	linux-mediatek, openbmc, linux-omap, linuxppc-dev, asahi,
	linux-arm-msm, linux-renesas-soc, linux-stm32, linux-tegra,
	virtualization

On 3/22/24 3:25 PM, Wolfram Sang wrote:
> Match the wording in i2c_algorithm in I2C drivers wrt. the newest I2C
> v7, SMBus 3.2, I3C specifications and replace "master/slave" with more
> appropriate terms. For some drivers, this means no more conversions are
> needed. For the others more work needs to be done but this will be
> performed incrementally along with API changes/improvements. All these
> changes here are simple search/replace results.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>   drivers/i2c/busses/i2c-amd-mp2-plat.c      |  2 +-
>   drivers/i2c/busses/i2c-at91-master.c       |  2 +-
>   drivers/i2c/busses/i2c-at91-slave.c        |  8 ++++----
>   drivers/i2c/busses/i2c-axxia.c             | 10 +++++-----
>   drivers/i2c/busses/i2c-cros-ec-tunnel.c    |  2 +-
>   drivers/i2c/busses/i2c-designware-master.c |  2 +-
>   drivers/i2c/busses/i2c-designware-slave.c  |  8 ++++----
>   drivers/i2c/busses/i2c-diolan-u2c.c        |  2 +-
>   drivers/i2c/busses/i2c-exynos5.c           |  4 ++--
>   drivers/i2c/busses/i2c-gxp.c               | 12 ++++++------
>   drivers/i2c/busses/i2c-hisi.c              |  4 ++--
>   drivers/i2c/busses/i2c-img-scb.c           |  2 +-
>   drivers/i2c/busses/i2c-imx.c               | 12 ++++++------
>   drivers/i2c/busses/i2c-jz4780.c            |  2 +-
>   drivers/i2c/busses/i2c-kempld.c            |  2 +-
>   drivers/i2c/busses/i2c-meson.c             |  4 ++--
>   drivers/i2c/busses/i2c-mlxbf.c             |  8 ++++----
>   drivers/i2c/busses/i2c-mt65xx.c            |  2 +-
>   drivers/i2c/busses/i2c-mxs.c               |  2 +-
>   drivers/i2c/busses/i2c-nomadik.c           |  2 +-
>   drivers/i2c/busses/i2c-npcm7xx.c           | 12 ++++++------
>   drivers/i2c/busses/i2c-nvidia-gpu.c        |  4 ++--
>   drivers/i2c/busses/i2c-ocores.c            |  8 ++++----
>   drivers/i2c/busses/i2c-octeon-platdrv.c    |  2 +-
>   drivers/i2c/busses/i2c-omap.c              |  4 ++--
>   drivers/i2c/busses/i2c-opal.c              |  4 ++--
>   drivers/i2c/busses/i2c-pasemi-core.c       |  2 +-
>   drivers/i2c/busses/i2c-pnx.c               |  2 +-
>   drivers/i2c/busses/i2c-pxa.c               | 12 ++++++------
>   drivers/i2c/busses/i2c-qcom-cci.c          |  2 +-
>   drivers/i2c/busses/i2c-qcom-geni.c         |  2 +-
>   drivers/i2c/busses/i2c-robotfuzz-osif.c    |  2 +-
>   drivers/i2c/busses/i2c-rzv2m.c             |  8 ++++----
>   drivers/i2c/busses/i2c-s3c2410.c           |  4 ++--
>   drivers/i2c/busses/i2c-stm32f7.c           | 14 +++++++-------
>   drivers/i2c/busses/i2c-tegra-bpmp.c        |  4 ++--
>   drivers/i2c/busses/i2c-tegra.c             |  4 ++--
>   drivers/i2c/busses/i2c-thunderx-pcidrv.c   |  2 +-
>   drivers/i2c/busses/i2c-virtio.c            |  2 +-
>   drivers/i2c/busses/i2c-wmt.c               |  2 +-
>   drivers/i2c/busses/i2c-xiic.c              |  2 +-
>   41 files changed, 95 insertions(+), 95 deletions(-)
> 

> diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
> index c7e56002809a..14c61b31f877 100644
> --- a/drivers/i2c/busses/i2c-designware-master.c
> +++ b/drivers/i2c/busses/i2c-designware-master.c
> @@ -832,7 +832,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
>   }
>   
>   static const struct i2c_algorithm i2c_dw_algo = {
> -	.master_xfer = i2c_dw_xfer,
> +	.xfer = i2c_dw_xfer,
>   	.functionality = i2c_dw_func,
>   };
>   
> diff --git a/drivers/i2c/busses/i2c-designware-slave.c b/drivers/i2c/busses/i2c-designware-slave.c
> index 2e079cf20bb5..b47ad6b16814 100644
> --- a/drivers/i2c/busses/i2c-designware-slave.c
> +++ b/drivers/i2c/busses/i2c-designware-slave.c
> @@ -58,7 +58,7 @@ static int i2c_dw_init_slave(struct dw_i2c_dev *dev)
>   	return 0;
>   }
>   
> -static int i2c_dw_reg_slave(struct i2c_client *slave)
> +static int i2c_dw_reg_target(struct i2c_client *slave)
>   {
>   	struct dw_i2c_dev *dev = i2c_get_adapdata(slave->adapter);
>   
> @@ -83,7 +83,7 @@ static int i2c_dw_reg_slave(struct i2c_client *slave)
>   	return 0;
>   }
>   
> -static int i2c_dw_unreg_slave(struct i2c_client *slave)
> +static int i2c_dw_unreg_target(struct i2c_client *slave)
>   {
>   	struct dw_i2c_dev *dev = i2c_get_adapdata(slave->adapter);
>   
> @@ -214,8 +214,8 @@ static irqreturn_t i2c_dw_isr_slave(int this_irq, void *dev_id)
>   
>   static const struct i2c_algorithm i2c_dw_algo = {
>   	.functionality = i2c_dw_func,
> -	.reg_slave = i2c_dw_reg_slave,
> -	.unreg_slave = i2c_dw_unreg_slave,
> +	.reg_target = i2c_dw_reg_target,
> +	.unreg_target = i2c_dw_unreg_target,
>   };

Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 00/64] i2c: reword i2c_algorithm according to newest specification
  2024-03-23  9:20 ` [PATCH 00/64] i2c: reword i2c_algorithm " Andi Shyti
@ 2024-03-26  0:36   ` Andi Shyti
  2024-04-05  8:48     ` Wolfram Sang
  0 siblings, 1 reply; 20+ messages in thread
From: Andi Shyti @ 2024-03-26  0:36 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, asahi, chrome-platform, imx, linux-actions,
	linux-amlogic, linux-arm-kernel, linux-arm-msm, linux-aspeed,
	linux-kernel, linux-mediatek, linux-mips, linux-omap,
	linuxppc-dev, linux-renesas-soc, linux-riscv, linux-rockchip,
	linux-rpi-kernel, linux-samsung-soc, linux-stm32, linux-sunxi,
	linux-tegra, openbmc, virtualization

Hi Wolfram,

> > @Andi: are you okay with this approach? It means you'd need to merge
> > -rc2 into your for-next branch. Or rebase if all fails.
> 
> I think it's a good plan, I'll try to support you with it.

Do you feel more comfortable if I take the patches as soon as
they are reviewd?

So far I have tagged patch 1-4 and I can already merge 2,3,4 as
long as you merge patch 1.

Andi

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification
  2024-03-22 13:25 ` [PATCH 64/64] i2c: reword i2c_algorithm in drivers " Wolfram Sang
                     ` (4 preceding siblings ...)
  2024-03-25  7:53   ` Jarkko Nikula
@ 2024-04-02 12:35   ` Linus Walleij
  5 siblings, 0 replies; 20+ messages in thread
From: Linus Walleij @ 2024-04-02 12:35 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Elie Morisse, Shyam Sundar S K, Andi Shyti,
	Codrin Ciubotariu, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, Krzysztof Adamski, Benson Leung, Guenter Roeck,
	Jarkko Nikula, Andy Shevchenko, Mika Westerberg, Jan Dabros,
	Krzysztof Kozlowski, Alim Akhtar, Jean-Marie Verdun,
	Nick Hawkins, Yicong Yang, Oleksij Rempel,
	Pengutronix Kernel Team, Shawn Guo, Sascha Hauer, Fabio Estevam,
	Paul Cercueil, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Khalil Blaiech, Asmaa Mnebhi, Qii Wang,
	Matthias Brugger, AngeloGioacchino Del Regno, Avi Fishman,
	Tomer Maimon, Tali Perry, Patrick Venture, Nancy Yuen,
	Benjamin Fair, Ajay Gupta, Peter Korsgaard, Andrew Lunn,
	Robert Richter, Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren,
	Vignesh R, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Aneesh Kumar K.V, Naveen N. Rao, Hector Martin, Sven Peter,
	Alyssa Rosenzweig, Vladimir Zapolskiy, Loic Poulain, Robert Foss,
	Bjorn Andersson, Konrad Dybcio, Fabrizio Castro,
	Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Thierry Reding, Jonathan Hunter,
	Laxman Dewangan, Dmitry Osipenko, Conghui Chen, Viresh Kumar,
	Michal Simek, linux-kernel, linux-arm-kernel, chrome-platform,
	linux-samsung-soc, imx, linux-mips, linux-amlogic,
	linux-mediatek, openbmc, linux-omap, linuxppc-dev, asahi,
	linux-arm-msm, linux-renesas-soc, linux-stm32, linux-tegra,
	virtualization

On Fri, Mar 22, 2024 at 2:27 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:

> Match the wording in i2c_algorithm in I2C drivers wrt. the newest I2C
> v7, SMBus 3.2, I3C specifications and replace "master/slave" with more
> appropriate terms. For some drivers, this means no more conversions are
> needed. For the others more work needs to be done but this will be
> performed incrementally along with API changes/improvements. All these
> changes here are simple search/replace results.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 00/64] i2c: reword i2c_algorithm according to newest specification
  2024-03-26  0:36   ` Andi Shyti
@ 2024-04-05  8:48     ` Wolfram Sang
  0 siblings, 0 replies; 20+ messages in thread
From: Wolfram Sang @ 2024-04-05  8:48 UTC (permalink / raw)
  To: Andi Shyti
  Cc: linux-i2c, asahi, chrome-platform, imx, linux-actions,
	linux-amlogic, linux-arm-kernel, linux-arm-msm, linux-aspeed,
	linux-kernel, linux-mediatek, linux-mips, linux-omap,
	linuxppc-dev, linux-renesas-soc, linux-riscv, linux-rockchip,
	linux-rpi-kernel, linux-samsung-soc, linux-stm32, linux-sunxi,
	linux-tegra, openbmc, virtualization

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

Hi Andi, hi everyone,

thank you for reviewing and waiting. I had a small personal hiatus over
Easter but now I am back. This series needs another cycle, so no need to
hurry. I will address some of the review comments but not all. The
conversion (and API improvements) are some bigger tasks, so
inconsistencies inbetween can't be avoided AFAICS.

I'll keep you updated.

Happy hacking,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-04-05  8:48 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-22 13:24 [PATCH 00/64] i2c: reword i2c_algorithm according to newest specification Wolfram Sang
2024-03-22 13:25 ` [PATCH 19/64] i2c: emev2: reword " Wolfram Sang
2024-03-22 13:25 ` [PATCH 45/64] i2c: rcar: " Wolfram Sang
2024-03-22 13:25 ` [PATCH 46/64] i2c: riic: " Wolfram Sang
2024-03-22 13:25 ` [PATCH 49/64] i2c: sh_mobile: " Wolfram Sang
2024-03-22 13:25 ` [PATCH 64/64] i2c: reword i2c_algorithm in drivers " Wolfram Sang
2024-03-22 14:34   ` Bjorn Andersson
2024-03-22 15:11   ` Nicolas Ferre
2024-03-22 16:47     ` Wolfram Sang
2024-03-22 17:05       ` Guenter Roeck
2024-03-22 17:09         ` Wolfram Sang
2024-03-22 16:09   ` Andy Shevchenko
2024-03-22 16:48     ` Wolfram Sang
2024-03-22 17:00       ` Andy Shevchenko
2024-03-25  7:45   ` Oleksij Rempel
2024-03-25  7:53   ` Jarkko Nikula
2024-04-02 12:35   ` Linus Walleij
2024-03-23  9:20 ` [PATCH 00/64] i2c: reword i2c_algorithm " Andi Shyti
2024-03-26  0:36   ` Andi Shyti
2024-04-05  8:48     ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).