Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-04-02 Thread Linus Walleij
On Fri, Mar 22, 2024 at 2:27 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 

Acked-by: Linus Walleij 

Yours,
Linus Walleij


Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-25 Thread Jarkko Nikula

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 
---
  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 


Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-25 Thread Oleksij Rempel
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 

Acked-by: Oleksij Rempel  # 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- |


Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-22 Thread Wolfram Sang

> 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!



signature.asc
Description: PGP signature


Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-22 Thread Nicolas Ferre

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 
---


[..]


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


[..]

Acked-by: Nicolas Ferre  # for at91
Probably file names themselves will need some care, in a second time.

Thanks. Regards,
  Nicolas

[..]


--
2.43.0





Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-22 Thread Guenter Roeck
On Fri, Mar 22, 2024 at 9:47 AM Wolfram Sang
 wrote:
>
>
> > Acked-by: Nicolas Ferre  # 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


Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-22 Thread Wolfram Sang

> Acked-by: Nicolas Ferre  # 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...



signature.asc
Description: PGP signature


Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-22 Thread Bjorn Andersson
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 

Reviewed-by: Bjorn Andersson 

Regards,
Bjorn


[PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-22 Thread Wolfram Sang
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 
---
 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
+++ 

Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-22 Thread Andy Shevchenko
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





Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-22 Thread Wolfram Sang

> >  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!



signature.asc
Description: PGP signature


Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-22 Thread Andy Shevchenko
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