* [PATCH v2 00/60] i2c: reword first drivers according to newest specification
@ 2024-07-06 11:20 Wolfram Sang
2024-07-06 11:20 ` [PATCH v2 35/60] i2c: opal: reword " Wolfram Sang
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Wolfram Sang @ 2024-07-06 11:20 UTC (permalink / raw)
To: linux-i2c
Cc: Andrew Lunn, Baruch Siach, Heiko Stuebner, Ajay Gupta,
Viresh Kumar, Manivannan Sadhasivam, Eddie James,
Alexandre Torgue, linux-mips, Paul Cercueil, Wolfram Sang,
Chris Brandt, Thierry Reding, Till Harbaum, Kamal Dasu,
Benson Leung, Stefan Roese, linux-stm32, Bence Csókás,
chrome-platform, Peter Korsgaard, Kunihiko Hayashi,
Florian Fainelli, Samuel Holland, Binbin Zhou, Chunyan Zhang,
Bartosz Golaszewski, Sven Peter, Jernej Skrabec, Jonathan Hunter,
linux-rockchip, Chen-Yu Tsai, Matthias Brugger, Ray Jui,
Alain Volmat, linux-sunxi, Guenter Roeck, Masami Hiramatsu,
Vadim Pasternak, Jean Delvare, Robert Richter, Andi Shyti,
Gregory CLEMENT, Hans Hu, linux-actions, virtualization,
Fabrizio Castro, Vladimir Zapolskiy, Hans de Goede, Chris Packham,
linux-mediatek, linux-rpi-kernel, Baolin Wang, Orson Zhai,
linux-tegra, Yicong Yang, Conghui Chen,
AngeloGioacchino Del Regno, Scott Branden, openbmc, Thor Thayer,
Hector Martin, linux-kernel, Michael Shych, Patrice Chotard,
linux-renesas-soc, asahi, Maxime Coquelin, Pierre-Yves MORDRET,
linuxppc-dev, Andreas Färber
Start changing the wording of the I2C main header wrt. the newest I2C
v7 and SMBus 3.2 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.
Changes since v1:
* changed wording according to the terminology we agreed on and defined
upstream. That means consistent use of "controller/target", and no
more "host/client". I added "local/remote target" where necessary.
* added tags which I kept despite some changes in wording. The approach
and code changes (if necessary) did not change.
* rebased to Andi's for-next branch
* this series only contains patches which convert the drivers fully. If
all goes well, no more updates for them are needed. The previous
series converted all users of "master_xfer". But to avoid tons of
incremental patches to one driver, I will incrementally improve i2c.h
and see which drivers can be fully converted step-by-step.
* do not mention I3C specs in commit messages, not really relevant here
Please note that I am not super strict with the 80 char limit. And, as
agreed, I did not convert occasions where old terminology is used in
register names or bits etc. or in function names outside of the I2C
realm.
The outcome is that before this series 115 drivers use old terminology,
after this only 54. Hooray.
And a comment to all janitors: Do not convert I2C drivers outside of
drivers/i2c yet. Let us first gain experience here and present the
well-tested results of what we figured out to other maintainers then.
This ensures they have to deal with way less patch revisions.
Thanks and happy hacking!
Wolfram Sang (60):
i2c: reword i2c_algorithm according to newest specification
i2c: ali15x3: reword according to newest specification
i2c: altera: reword according to newest specification
i2c: au1550: 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: cht-wc: reword according to newest specification
i2c: cp2615: reword according to newest specification
i2c: cros-ec-tunnel: reword according to newest specification
i2c: davinci: reword according to newest specification
i2c: digicolor: reword according to newest specification
i2c: diolan-u2c: reword according to newest specification
i2c: dln2: 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: hisi: 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: iop3xx: reword according to newest specification
i2c: isch: reword according to newest specification
i2c: jz4780: reword according to newest specification
i2c: kempld: 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: 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: ocores: reword according to newest specification
i2c: octeon: reword according to newest specification
i2c: opal: reword according to newest specification
i2c: owl: reword according to newest specification
i2c: pasemi: 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: riic: reword according to newest specification
i2c: rk3x: reword according to newest specification
i2c: robotfuzz-osif: reword according to newest specification
i2c: rzv2m: reword according to newest specification
i2c: sis5595: reword according to newest specification
i2c: sprd: reword according to newest specification
i2c: stm32f4: reword according to newest specification
i2c: sun6i-p2wi: reword according to newest specification
i2c: taos-evm: reword according to newest specification
i2c: tegra-bpmp: reword according to newest specification
i2c: thunderx-pcidrv: 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: viai2c: reword according to newest specification
i2c: nvidia-gpu: reword according to newest specification
i2c: virtio: reword according to newest specification
i2c: cpm: reword according to newest specification
i2c: st: reword according to newest specification
drivers/i2c/busses/i2c-ali15x3.c | 2 +-
drivers/i2c/busses/i2c-altera.c | 4 +-
drivers/i2c/busses/i2c-au1550.c | 15 +++----
drivers/i2c/busses/i2c-bcm-kona.c | 13 +++---
drivers/i2c/busses/i2c-bcm2835.c | 10 ++---
drivers/i2c/busses/i2c-brcmstb.c | 11 +++--
drivers/i2c/busses/i2c-cht-wc.c | 8 ++--
drivers/i2c/busses/i2c-cp2615.c | 8 ++--
drivers/i2c/busses/i2c-cpm.c | 4 +-
drivers/i2c/busses/i2c-cros-ec-tunnel.c | 4 +-
drivers/i2c/busses/i2c-davinci.c | 17 ++++---
drivers/i2c/busses/i2c-digicolor.c | 6 +--
drivers/i2c/busses/i2c-diolan-u2c.c | 2 +-
drivers/i2c/busses/i2c-dln2.c | 4 +-
drivers/i2c/busses/i2c-fsi.c | 56 ++++++++++++------------
drivers/i2c/busses/i2c-gpio.c | 8 ++--
drivers/i2c/busses/i2c-highlander.c | 2 +-
drivers/i2c/busses/i2c-hisi.c | 8 ++--
drivers/i2c/busses/i2c-hix5hd2.c | 6 +--
drivers/i2c/busses/i2c-i801.c | 12 ++---
drivers/i2c/busses/i2c-ibm_iic.c | 27 +++++-------
drivers/i2c/busses/i2c-iop3xx.c | 15 +++----
drivers/i2c/busses/i2c-isch.c | 2 +-
drivers/i2c/busses/i2c-jz4780.c | 4 +-
drivers/i2c/busses/i2c-kempld.c | 4 +-
drivers/i2c/busses/i2c-ljca.c | 20 ++++-----
drivers/i2c/busses/i2c-lpc2k.c | 10 ++---
drivers/i2c/busses/i2c-ls2x.c | 11 +++--
drivers/i2c/busses/i2c-mlxcpld.c | 14 +++---
drivers/i2c/busses/i2c-mpc.c | 4 +-
drivers/i2c/busses/i2c-mt7621.c | 26 +++++------
drivers/i2c/busses/i2c-mv64xxx.c | 12 ++---
drivers/i2c/busses/i2c-nvidia-gpu.c | 7 ++-
drivers/i2c/busses/i2c-ocores.c | 8 ++--
drivers/i2c/busses/i2c-octeon-core.c | 6 +--
drivers/i2c/busses/i2c-octeon-core.h | 4 +-
drivers/i2c/busses/i2c-octeon-platdrv.c | 2 +-
drivers/i2c/busses/i2c-opal.c | 10 ++---
drivers/i2c/busses/i2c-owl.c | 12 ++---
drivers/i2c/busses/i2c-pasemi-core.c | 6 +--
drivers/i2c/busses/i2c-piix4.c | 2 +-
drivers/i2c/busses/i2c-powermac.c | 14 +++---
drivers/i2c/busses/i2c-pxa-pci.c | 2 +-
drivers/i2c/busses/i2c-riic.c | 8 ++--
drivers/i2c/busses/i2c-rk3x.c | 20 ++++-----
drivers/i2c/busses/i2c-robotfuzz-osif.c | 4 +-
drivers/i2c/busses/i2c-rzv2m.c | 12 ++---
drivers/i2c/busses/i2c-sis5595.c | 2 +-
drivers/i2c/busses/i2c-sprd.c | 16 +++----
drivers/i2c/busses/i2c-st.c | 8 ++--
drivers/i2c/busses/i2c-stm32f4.c | 8 ++--
drivers/i2c/busses/i2c-sun6i-p2wi.c | 20 ++++-----
drivers/i2c/busses/i2c-taos-evm.c | 2 +-
drivers/i2c/busses/i2c-tegra-bpmp.c | 4 +-
drivers/i2c/busses/i2c-thunderx-pcidrv.c | 2 +-
drivers/i2c/busses/i2c-tiny-usb.c | 6 +--
drivers/i2c/busses/i2c-uniphier-f.c | 26 +++++------
drivers/i2c/busses/i2c-uniphier.c | 15 +++----
drivers/i2c/busses/i2c-viai2c-common.c | 2 +-
drivers/i2c/busses/i2c-viai2c-wmt.c | 8 ++--
drivers/i2c/busses/i2c-viai2c-zhaoxin.c | 12 ++---
drivers/i2c/busses/i2c-viperboard.c | 10 ++---
drivers/i2c/busses/i2c-virtio.c | 2 +-
include/linux/i2c.h | 24 +++++++---
64 files changed, 313 insertions(+), 320 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH v2 35/60] i2c: opal: reword according to newest specification
2024-07-06 11:20 [PATCH v2 00/60] i2c: reword first drivers according to newest specification Wolfram Sang
@ 2024-07-06 11:20 ` Wolfram Sang
2024-07-11 8:06 ` Andi Shyti
2024-07-06 11:20 ` [PATCH v2 37/60] i2c: pasemi: " Wolfram Sang
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Wolfram Sang @ 2024-07-06 11:20 UTC (permalink / raw)
To: linux-i2c
Cc: Andi Shyti, linux-kernel, Christophe Leroy, Wolfram Sang,
Nicholas Piggin, Naveen N. Rao, linuxppc-dev
Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2
specifications and replace "master/slave" with more appropriate terms.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-opal.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/i2c/busses/i2c-opal.c b/drivers/i2c/busses/i2c-opal.c
index 17ef87d50f7c..d9dd71cf37fd 100644
--- a/drivers/i2c/busses/i2c-opal.c
+++ b/drivers/i2c/busses/i2c-opal.c
@@ -70,8 +70,8 @@ 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,
- int num)
+static int i2c_opal_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
+ int num)
{
unsigned long opal_id = (unsigned long)adap->algo_data;
struct opal_i2c_request req;
@@ -179,9 +179,9 @@ static u32 i2c_opal_func(struct i2c_adapter *adapter)
}
static const struct i2c_algorithm i2c_opal_algo = {
- .master_xfer = i2c_opal_master_xfer,
- .smbus_xfer = i2c_opal_smbus_xfer,
- .functionality = i2c_opal_func,
+ .xfer = i2c_opal_xfer,
+ .smbus_xfer = i2c_opal_smbus_xfer,
+ .functionality = i2c_opal_func,
};
/*
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH v2 35/60] i2c: opal: reword according to newest specification
2024-07-06 11:20 ` [PATCH v2 35/60] i2c: opal: reword " Wolfram Sang
@ 2024-07-11 8:06 ` Andi Shyti
0 siblings, 0 replies; 11+ messages in thread
From: Andi Shyti @ 2024-07-11 8:06 UTC (permalink / raw)
To: Wolfram Sang
Cc: Nicholas Piggin, linux-kernel, Christophe Leroy, linux-i2c,
Naveen N. Rao, linuxppc-dev
Hi Wolfram,
On Sat, Jul 06, 2024 at 01:20:35PM GMT, Wolfram Sang wrote:
> Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2
> specifications and replace "master/slave" with more appropriate terms.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Thanks,
Andi
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 37/60] i2c: pasemi: reword according to newest specification
2024-07-06 11:20 [PATCH v2 00/60] i2c: reword first drivers according to newest specification Wolfram Sang
2024-07-06 11:20 ` [PATCH v2 35/60] i2c: opal: reword " Wolfram Sang
@ 2024-07-06 11:20 ` Wolfram Sang
2024-07-07 10:50 ` Sven Peter
2024-07-11 8:07 ` Andi Shyti
2024-07-06 11:20 ` [PATCH v2 39/60] i2c: powermac: " Wolfram Sang
` (2 subsequent siblings)
4 siblings, 2 replies; 11+ messages in thread
From: Wolfram Sang @ 2024-07-06 11:20 UTC (permalink / raw)
To: linux-i2c
Cc: Andi Shyti, Sven Peter, Hector Martin, linux-kernel,
Christophe Leroy, Wolfram Sang, Nicholas Piggin, Naveen N. Rao,
linuxppc-dev, Alyssa Rosenzweig, asahi
Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2
specifications and replace "master/slave" with more appropriate terms.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-pasemi-core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-pasemi-core.c b/drivers/i2c/busses/i2c-pasemi-core.c
index bd8becbdeeb2..dac694a9d781 100644
--- a/drivers/i2c/busses/i2c-pasemi-core.c
+++ b/drivers/i2c/busses/i2c-pasemi-core.c
@@ -336,9 +336,9 @@ static u32 pasemi_smb_func(struct i2c_adapter *adapter)
}
static const struct i2c_algorithm smbus_algorithm = {
- .master_xfer = pasemi_i2c_xfer,
- .smbus_xfer = pasemi_smb_xfer,
- .functionality = pasemi_smb_func,
+ .xfer = pasemi_i2c_xfer,
+ .smbus_xfer = pasemi_smb_xfer,
+ .functionality = pasemi_smb_func,
};
int pasemi_i2c_common_probe(struct pasemi_smbus *smbus)
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH v2 37/60] i2c: pasemi: reword according to newest specification
2024-07-06 11:20 ` [PATCH v2 37/60] i2c: pasemi: " Wolfram Sang
@ 2024-07-07 10:50 ` Sven Peter
2024-07-11 8:07 ` Andi Shyti
1 sibling, 0 replies; 11+ messages in thread
From: Sven Peter @ 2024-07-07 10:50 UTC (permalink / raw)
To: Wolfram Sang
Cc: Andi Shyti, Hector Martin, Nicholas Piggin, linux-kernel,
Christophe Leroy, linux-i2c, Naveen N. Rao, linuxppc-dev,
Alyssa Rosenzweig, asahi
>
> On 6. Jul 2024, at 13:22, Wolfram Sang <wsa+renesas@sang-engineering.com> wrote:
>
> Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2
> specifications and replace "master/slave" with more appropriate terms.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
Acked-by: Sven Peter <sven@svenpeter.dev>
> drivers/i2c/busses/i2c-pasemi-core.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-pasemi-core.c b/drivers/i2c/busses/i2c-pasemi-core.c
> index bd8becbdeeb2..dac694a9d781 100644
> --- a/drivers/i2c/busses/i2c-pasemi-core.c
> +++ b/drivers/i2c/busses/i2c-pasemi-core.c
> @@ -336,9 +336,9 @@ static u32 pasemi_smb_func(struct i2c_adapter *adapter)
> }
>
> static const struct i2c_algorithm smbus_algorithm = {
> - .master_xfer = pasemi_i2c_xfer,
> - .smbus_xfer = pasemi_smb_xfer,
> - .functionality = pasemi_smb_func,
> + .xfer = pasemi_i2c_xfer,
> + .smbus_xfer = pasemi_smb_xfer,
> + .functionality = pasemi_smb_func,
> };
>
> int pasemi_i2c_common_probe(struct pasemi_smbus *smbus)
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v2 37/60] i2c: pasemi: reword according to newest specification
2024-07-06 11:20 ` [PATCH v2 37/60] i2c: pasemi: " Wolfram Sang
2024-07-07 10:50 ` Sven Peter
@ 2024-07-11 8:07 ` Andi Shyti
1 sibling, 0 replies; 11+ messages in thread
From: Andi Shyti @ 2024-07-11 8:07 UTC (permalink / raw)
To: Wolfram Sang
Cc: Sven Peter, Hector Martin, Nicholas Piggin, linux-kernel,
Christophe Leroy, linux-i2c, Naveen N. Rao, linuxppc-dev,
Alyssa Rosenzweig, asahi
Hi Wolfram,
On Sat, Jul 06, 2024 at 01:20:37PM GMT, Wolfram Sang wrote:
> Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2
> specifications and replace "master/slave" with more appropriate terms.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Thanks,
Andi
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 39/60] i2c: powermac: reword according to newest specification
2024-07-06 11:20 [PATCH v2 00/60] i2c: reword first drivers according to newest specification Wolfram Sang
2024-07-06 11:20 ` [PATCH v2 35/60] i2c: opal: reword " Wolfram Sang
2024-07-06 11:20 ` [PATCH v2 37/60] i2c: pasemi: " Wolfram Sang
@ 2024-07-06 11:20 ` Wolfram Sang
2024-07-11 8:10 ` Andi Shyti
2024-07-06 11:20 ` [PATCH v2 59/60] i2c: cpm: " Wolfram Sang
2024-07-11 13:16 ` [PATCH v2 00/60] i2c: reword first drivers " Andi Shyti
4 siblings, 1 reply; 11+ messages in thread
From: Wolfram Sang @ 2024-07-06 11:20 UTC (permalink / raw)
To: linux-i2c
Cc: Andi Shyti, linux-kernel, Christophe Leroy, Wolfram Sang,
Nicholas Piggin, Naveen N. Rao, linuxppc-dev
Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2
specifications and replace "master/slave" with more appropriate terms.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-powermac.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c
index 8e57ebe595be..b6b03539f626 100644
--- a/drivers/i2c/busses/i2c-powermac.c
+++ b/drivers/i2c/busses/i2c-powermac.c
@@ -127,13 +127,13 @@ static s32 i2c_powermac_smbus_xfer( struct i2c_adapter* adap,
}
/*
- * Generic i2c master transfer entrypoint. This driver only support single
+ * Generic i2c transfer entrypoint. This driver only supports single
* messages (for "lame i2c" transfers). Anything else should use the smbus
* entry point
*/
-static int i2c_powermac_master_xfer( struct i2c_adapter *adap,
- struct i2c_msg *msgs,
- int num)
+static int i2c_powermac_xfer(struct i2c_adapter *adap,
+ struct i2c_msg *msgs,
+ int num)
{
struct pmac_i2c_bus *bus = i2c_get_adapdata(adap);
int rc = 0;
@@ -179,9 +179,9 @@ static u32 i2c_powermac_func(struct i2c_adapter * adapter)
/* For now, we only handle smbus */
static const struct i2c_algorithm i2c_powermac_algorithm = {
- .smbus_xfer = i2c_powermac_smbus_xfer,
- .master_xfer = i2c_powermac_master_xfer,
- .functionality = i2c_powermac_func,
+ .smbus_xfer = i2c_powermac_smbus_xfer,
+ .xfer = i2c_powermac_xfer,
+ .functionality = i2c_powermac_func,
};
static const struct i2c_adapter_quirks i2c_powermac_quirks = {
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH v2 39/60] i2c: powermac: reword according to newest specification
2024-07-06 11:20 ` [PATCH v2 39/60] i2c: powermac: " Wolfram Sang
@ 2024-07-11 8:10 ` Andi Shyti
0 siblings, 0 replies; 11+ messages in thread
From: Andi Shyti @ 2024-07-11 8:10 UTC (permalink / raw)
To: Wolfram Sang
Cc: Nicholas Piggin, linux-kernel, Christophe Leroy, linux-i2c,
Naveen N. Rao, linuxppc-dev
Hi Wolfram,
> -static int i2c_powermac_master_xfer( struct i2c_adapter *adap,
> - struct i2c_msg *msgs,
> - int num)
> +static int i2c_powermac_xfer(struct i2c_adapter *adap,
> + struct i2c_msg *msgs,
> + int num)
and we get a nice free cleanup here :-)
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Thanks,
Andi
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 59/60] i2c: cpm: reword according to newest specification
2024-07-06 11:20 [PATCH v2 00/60] i2c: reword first drivers according to newest specification Wolfram Sang
` (2 preceding siblings ...)
2024-07-06 11:20 ` [PATCH v2 39/60] i2c: powermac: " Wolfram Sang
@ 2024-07-06 11:20 ` Wolfram Sang
2024-07-11 13:16 ` [PATCH v2 00/60] i2c: reword first drivers " Andi Shyti
4 siblings, 0 replies; 11+ messages in thread
From: Wolfram Sang @ 2024-07-06 11:20 UTC (permalink / raw)
To: linux-i2c; +Cc: Wolfram Sang, linuxppc-dev, Andi Shyti, linux-kernel
Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2
specifications and replace "master/slave" with more appropriate terms.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Acked-by: Jochen Friedrich <jochen@scram.de>
---
drivers/i2c/busses/i2c-cpm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
index 4404b4aac676..4794ec066eb0 100644
--- a/drivers/i2c/busses/i2c-cpm.c
+++ b/drivers/i2c/busses/i2c-cpm.c
@@ -402,7 +402,7 @@ static u32 cpm_i2c_func(struct i2c_adapter *adap)
/* -----exported algorithm data: ------------------------------------- */
static const struct i2c_algorithm cpm_i2c_algo = {
- .master_xfer = cpm_i2c_xfer,
+ .xfer = cpm_i2c_xfer,
.functionality = cpm_i2c_func,
};
@@ -570,7 +570,7 @@ static int cpm_i2c_setup(struct cpm_i2c *cpm)
out_8(&cpm->i2c_reg->i2brg, brg);
out_8(&cpm->i2c_reg->i2mod, 0x00);
- out_8(&cpm->i2c_reg->i2com, I2COM_MASTER); /* Master mode */
+ out_8(&cpm->i2c_reg->i2com, I2COM_MASTER);
/* Disable interrupts. */
out_8(&cpm->i2c_reg->i2cmr, 0);
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH v2 00/60] i2c: reword first drivers according to newest specification
2024-07-06 11:20 [PATCH v2 00/60] i2c: reword first drivers according to newest specification Wolfram Sang
` (3 preceding siblings ...)
2024-07-06 11:20 ` [PATCH v2 59/60] i2c: cpm: " Wolfram Sang
@ 2024-07-11 13:16 ` Andi Shyti
2024-07-11 14:45 ` Wolfram Sang
4 siblings, 1 reply; 11+ messages in thread
From: Andi Shyti @ 2024-07-11 13:16 UTC (permalink / raw)
To: Wolfram Sang
Cc: Andrew Lunn, Baruch Siach, Heiko Stuebner, Ajay Gupta,
Viresh Kumar, Manivannan Sadhasivam, Eddie James,
Alexandre Torgue, linux-mips, Paul Cercueil, Matthias Brugger,
Chris Brandt, Thierry Reding, linux-i2c, Kamal Dasu, Benson Leung,
Stefan Roese, linux-stm32, chrome-platform, Peter Korsgaard,
Kunihiko Hayashi, Florian Fainelli, Samuel Holland, Binbin Zhou,
Chunyan Zhang, Bartosz Golaszewski, Sven Peter, Jernej Skrabec,
Jonathan Hunter, linux-rockchip, Chen-Yu Tsai, Ray Jui,
Alain Volmat, linux-sunxi, Guenter Roeck, Masami Hiramatsu,
Vadim Pasternak, Jean Delvare, Robert Richter,
Bence Csókás, Gregory CLEMENT, Hans Hu, linux-actions,
virtualization, Fabrizio Castro, Vladimir Zapolskiy,
Hans de Goede, Chris Packham, linux-mediatek, linux-rpi-kernel,
Baolin Wang, Orson Zhai, linux-tegra, Yicong Yang, Conghui Chen,
AngeloGioacchino Del Regno, Scott Branden, openbmc, Thor Thayer,
Hector Martin, linux-kernel, Michael Shych, Patrice Chotard,
linux-renesas-soc, asahi, Maxime Coquelin, Pierre-Yves MORDRET,
linuxppc-dev, Andreas Färber, Till Harbaum
Hi Wolfram,
pushed in i2c/i2c-host.
Thanks for this big work, at the end it turned out quite nice and
I'm happy of the outcome!
Thanks
Andi
On Sat, Jul 06, 2024 at 01:20:00PM GMT, Wolfram Sang wrote:
> Start changing the wording of the I2C main header wrt. the newest I2C
> v7 and SMBus 3.2 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.
>
> Changes since v1:
>
> * changed wording according to the terminology we agreed on and defined
> upstream. That means consistent use of "controller/target", and no
> more "host/client". I added "local/remote target" where necessary.
> * added tags which I kept despite some changes in wording. The approach
> and code changes (if necessary) did not change.
> * rebased to Andi's for-next branch
> * this series only contains patches which convert the drivers fully. If
> all goes well, no more updates for them are needed. The previous
> series converted all users of "master_xfer". But to avoid tons of
> incremental patches to one driver, I will incrementally improve i2c.h
> and see which drivers can be fully converted step-by-step.
> * do not mention I3C specs in commit messages, not really relevant here
>
> Please note that I am not super strict with the 80 char limit. And, as
> agreed, I did not convert occasions where old terminology is used in
> register names or bits etc. or in function names outside of the I2C
> realm.
>
> The outcome is that before this series 115 drivers use old terminology,
> after this only 54. Hooray.
>
> And a comment to all janitors: Do not convert I2C drivers outside of
> drivers/i2c yet. Let us first gain experience here and present the
> well-tested results of what we figured out to other maintainers then.
> This ensures they have to deal with way less patch revisions.
>
> Thanks and happy hacking!
>
>
> Wolfram Sang (60):
> i2c: reword i2c_algorithm according to newest specification
> i2c: ali15x3: reword according to newest specification
> i2c: altera: reword according to newest specification
> i2c: au1550: 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: cht-wc: reword according to newest specification
> i2c: cp2615: reword according to newest specification
> i2c: cros-ec-tunnel: reword according to newest specification
> i2c: davinci: reword according to newest specification
> i2c: digicolor: reword according to newest specification
> i2c: diolan-u2c: reword according to newest specification
> i2c: dln2: 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: hisi: 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: iop3xx: reword according to newest specification
> i2c: isch: reword according to newest specification
> i2c: jz4780: reword according to newest specification
> i2c: kempld: 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: 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: ocores: reword according to newest specification
> i2c: octeon: reword according to newest specification
> i2c: opal: reword according to newest specification
> i2c: owl: reword according to newest specification
> i2c: pasemi: 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: riic: reword according to newest specification
> i2c: rk3x: reword according to newest specification
> i2c: robotfuzz-osif: reword according to newest specification
> i2c: rzv2m: reword according to newest specification
> i2c: sis5595: reword according to newest specification
> i2c: sprd: reword according to newest specification
> i2c: stm32f4: reword according to newest specification
> i2c: sun6i-p2wi: reword according to newest specification
> i2c: taos-evm: reword according to newest specification
> i2c: tegra-bpmp: reword according to newest specification
> i2c: thunderx-pcidrv: 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: viai2c: reword according to newest specification
> i2c: nvidia-gpu: reword according to newest specification
> i2c: virtio: reword according to newest specification
> i2c: cpm: reword according to newest specification
> i2c: st: reword according to newest specification
>
> drivers/i2c/busses/i2c-ali15x3.c | 2 +-
> drivers/i2c/busses/i2c-altera.c | 4 +-
> drivers/i2c/busses/i2c-au1550.c | 15 +++----
> drivers/i2c/busses/i2c-bcm-kona.c | 13 +++---
> drivers/i2c/busses/i2c-bcm2835.c | 10 ++---
> drivers/i2c/busses/i2c-brcmstb.c | 11 +++--
> drivers/i2c/busses/i2c-cht-wc.c | 8 ++--
> drivers/i2c/busses/i2c-cp2615.c | 8 ++--
> drivers/i2c/busses/i2c-cpm.c | 4 +-
> drivers/i2c/busses/i2c-cros-ec-tunnel.c | 4 +-
> drivers/i2c/busses/i2c-davinci.c | 17 ++++---
> drivers/i2c/busses/i2c-digicolor.c | 6 +--
> drivers/i2c/busses/i2c-diolan-u2c.c | 2 +-
> drivers/i2c/busses/i2c-dln2.c | 4 +-
> drivers/i2c/busses/i2c-fsi.c | 56 ++++++++++++------------
> drivers/i2c/busses/i2c-gpio.c | 8 ++--
> drivers/i2c/busses/i2c-highlander.c | 2 +-
> drivers/i2c/busses/i2c-hisi.c | 8 ++--
> drivers/i2c/busses/i2c-hix5hd2.c | 6 +--
> drivers/i2c/busses/i2c-i801.c | 12 ++---
> drivers/i2c/busses/i2c-ibm_iic.c | 27 +++++-------
> drivers/i2c/busses/i2c-iop3xx.c | 15 +++----
> drivers/i2c/busses/i2c-isch.c | 2 +-
> drivers/i2c/busses/i2c-jz4780.c | 4 +-
> drivers/i2c/busses/i2c-kempld.c | 4 +-
> drivers/i2c/busses/i2c-ljca.c | 20 ++++-----
> drivers/i2c/busses/i2c-lpc2k.c | 10 ++---
> drivers/i2c/busses/i2c-ls2x.c | 11 +++--
> drivers/i2c/busses/i2c-mlxcpld.c | 14 +++---
> drivers/i2c/busses/i2c-mpc.c | 4 +-
> drivers/i2c/busses/i2c-mt7621.c | 26 +++++------
> drivers/i2c/busses/i2c-mv64xxx.c | 12 ++---
> drivers/i2c/busses/i2c-nvidia-gpu.c | 7 ++-
> drivers/i2c/busses/i2c-ocores.c | 8 ++--
> drivers/i2c/busses/i2c-octeon-core.c | 6 +--
> drivers/i2c/busses/i2c-octeon-core.h | 4 +-
> drivers/i2c/busses/i2c-octeon-platdrv.c | 2 +-
> drivers/i2c/busses/i2c-opal.c | 10 ++---
> drivers/i2c/busses/i2c-owl.c | 12 ++---
> drivers/i2c/busses/i2c-pasemi-core.c | 6 +--
> drivers/i2c/busses/i2c-piix4.c | 2 +-
> drivers/i2c/busses/i2c-powermac.c | 14 +++---
> drivers/i2c/busses/i2c-pxa-pci.c | 2 +-
> drivers/i2c/busses/i2c-riic.c | 8 ++--
> drivers/i2c/busses/i2c-rk3x.c | 20 ++++-----
> drivers/i2c/busses/i2c-robotfuzz-osif.c | 4 +-
> drivers/i2c/busses/i2c-rzv2m.c | 12 ++---
> drivers/i2c/busses/i2c-sis5595.c | 2 +-
> drivers/i2c/busses/i2c-sprd.c | 16 +++----
> drivers/i2c/busses/i2c-st.c | 8 ++--
> drivers/i2c/busses/i2c-stm32f4.c | 8 ++--
> drivers/i2c/busses/i2c-sun6i-p2wi.c | 20 ++++-----
> drivers/i2c/busses/i2c-taos-evm.c | 2 +-
> drivers/i2c/busses/i2c-tegra-bpmp.c | 4 +-
> drivers/i2c/busses/i2c-thunderx-pcidrv.c | 2 +-
> drivers/i2c/busses/i2c-tiny-usb.c | 6 +--
> drivers/i2c/busses/i2c-uniphier-f.c | 26 +++++------
> drivers/i2c/busses/i2c-uniphier.c | 15 +++----
> drivers/i2c/busses/i2c-viai2c-common.c | 2 +-
> drivers/i2c/busses/i2c-viai2c-wmt.c | 8 ++--
> drivers/i2c/busses/i2c-viai2c-zhaoxin.c | 12 ++---
> drivers/i2c/busses/i2c-viperboard.c | 10 ++---
> drivers/i2c/busses/i2c-virtio.c | 2 +-
> include/linux/i2c.h | 24 +++++++---
> 64 files changed, 313 insertions(+), 320 deletions(-)
>
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v2 00/60] i2c: reword first drivers according to newest specification
2024-07-11 13:16 ` [PATCH v2 00/60] i2c: reword first drivers " Andi Shyti
@ 2024-07-11 14:45 ` Wolfram Sang
0 siblings, 0 replies; 11+ messages in thread
From: Wolfram Sang @ 2024-07-11 14:45 UTC (permalink / raw)
To: Andi Shyti
Cc: Andrew Lunn, Baruch Siach, Heiko Stuebner, Ajay Gupta,
Viresh Kumar, Manivannan Sadhasivam, Eddie James,
Alexandre Torgue, linux-mips, Paul Cercueil, Matthias Brugger,
Chris Brandt, Thierry Reding, linux-i2c, Kamal Dasu, Benson Leung,
Stefan Roese, linux-stm32, chrome-platform, Peter Korsgaard,
Kunihiko Hayashi, Florian Fainelli, Samuel Holland, Binbin Zhou,
Chunyan Zhang, Bartosz Golaszewski, Sven Peter, Jernej Skrabec,
Jonathan Hunter, linux-rockchip, Chen-Yu Tsai, Ray Jui,
Alain Volmat, linux-sunxi, Guenter Roeck, Masami Hiramatsu,
Vadim Pasternak, Jean Delvare, Robert Richter,
Bence Csókás, Gregory CLEMENT, Hans Hu, linux-actions,
virtualization, Fabrizio Castro, Vladimir Zapolskiy,
Hans de Goede, Chris Packham, linux-mediatek, linux-rpi-kernel,
Baolin Wang, Orson Zhai, linux-tegra, Yicong Yang, Conghui Chen,
AngeloGioacchino Del Regno, Scott Branden, openbmc, Thor Thayer,
Hector Martin, linux-kernel, Michael Shych, Patrice Chotard,
linux-renesas-soc, asahi, Maxime Coquelin, Pierre-Yves MORDRET,
linuxppc-dev, Andreas Färber, Till Harbaum
[-- Attachment #1: Type: text/plain, Size: 148 bytes --]
> Thanks for this big work, at the end it turned out quite nice and
> I'm happy of the outcome!
Me too. And thanks for the enormous review work!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-07-11 22:56 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-06 11:20 [PATCH v2 00/60] i2c: reword first drivers according to newest specification Wolfram Sang
2024-07-06 11:20 ` [PATCH v2 35/60] i2c: opal: reword " Wolfram Sang
2024-07-11 8:06 ` Andi Shyti
2024-07-06 11:20 ` [PATCH v2 37/60] i2c: pasemi: " Wolfram Sang
2024-07-07 10:50 ` Sven Peter
2024-07-11 8:07 ` Andi Shyti
2024-07-06 11:20 ` [PATCH v2 39/60] i2c: powermac: " Wolfram Sang
2024-07-11 8:10 ` Andi Shyti
2024-07-06 11:20 ` [PATCH v2 59/60] i2c: cpm: " Wolfram Sang
2024-07-11 13:16 ` [PATCH v2 00/60] i2c: reword first drivers " Andi Shyti
2024-07-11 14:45 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox