linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: rohm-bdXXX - switch to use i2c probe_new
@ 2020-03-26  6:48 Matti Vaittinen
  2020-04-15  9:50 ` Lee Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Matti Vaittinen @ 2020-03-26  6:48 UTC (permalink / raw)
  To: matti.vaittinen, mazziesaccount; +Cc: Lee Jones, linux-kernel

ROHM BD70528 and BD718x7 drivers do not utilize the I2C id.
Do the trivial conversion and make them to use probe_new
instead of probe.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
---
 drivers/mfd/rohm-bd70528.c | 5 ++---
 drivers/mfd/rohm-bd718x7.c | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/mfd/rohm-bd70528.c b/drivers/mfd/rohm-bd70528.c
index 5c44d3b77b3e..179584d10109 100644
--- a/drivers/mfd/rohm-bd70528.c
+++ b/drivers/mfd/rohm-bd70528.c
@@ -216,8 +216,7 @@ static struct regmap_irq_chip bd70528_irq_chip = {
 	.irq_reg_stride = 1,
 };
 
-static int bd70528_i2c_probe(struct i2c_client *i2c,
-			     const struct i2c_device_id *id)
+static int bd70528_i2c_probe(struct i2c_client *i2c)
 {
 	struct bd70528_data *bd70528;
 	struct regmap_irq_chip_data *irq_data;
@@ -304,7 +303,7 @@ static struct i2c_driver bd70528_drv = {
 		.name = "rohm-bd70528",
 		.of_match_table = bd70528_of_match,
 	},
-	.probe = &bd70528_i2c_probe,
+	.probe_new = &bd70528_i2c_probe,
 };
 
 module_i2c_driver(bd70528_drv);
diff --git a/drivers/mfd/rohm-bd718x7.c b/drivers/mfd/rohm-bd718x7.c
index c32c1b6c98fa..e621e1a82222 100644
--- a/drivers/mfd/rohm-bd718x7.c
+++ b/drivers/mfd/rohm-bd718x7.c
@@ -129,8 +129,7 @@ static int bd718xx_init_press_duration(struct bd718xx *bd718xx)
 	return 0;
 }
 
-static int bd718xx_i2c_probe(struct i2c_client *i2c,
-			    const struct i2c_device_id *id)
+static int bd718xx_i2c_probe(struct i2c_client *i2c)
 {
 	struct bd718xx *bd718xx;
 	int ret;
@@ -226,7 +225,7 @@ static struct i2c_driver bd718xx_i2c_driver = {
 		.name = "rohm-bd718x7",
 		.of_match_table = bd718xx_of_match,
 	},
-	.probe = bd718xx_i2c_probe,
+	.probe_new = bd718xx_i2c_probe,
 };
 
 static int __init bd718xx_i2c_init(void)

base-commit: 16fbf79b0f83bc752cee8589279f1ebfe57b3b6e
-- 
2.21.0


-- 
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =] 

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

* Re: [PATCH] mfd: rohm-bdXXX - switch to use i2c probe_new
  2020-03-26  6:48 [PATCH] mfd: rohm-bdXXX - switch to use i2c probe_new Matti Vaittinen
@ 2020-04-15  9:50 ` Lee Jones
  2020-04-15 10:49   ` Vaittinen, Matti
  0 siblings, 1 reply; 6+ messages in thread
From: Lee Jones @ 2020-04-15  9:50 UTC (permalink / raw)
  To: Matti Vaittinen; +Cc: mazziesaccount, linux-kernel

On Thu, 26 Mar 2020, Matti Vaittinen wrote:

> ROHM BD70528 and BD718x7 drivers do not utilize the I2C id.
> Do the trivial conversion and make them to use probe_new
> instead of probe.

Not sure I understand the purpose of the patch.

The only reason to switch to probe_new is to aid the removal of the
compulsory I2C tables.  However, neither of these drivers have them.

> Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> ---
>  drivers/mfd/rohm-bd70528.c | 5 ++---
>  drivers/mfd/rohm-bd718x7.c | 5 ++---
>  2 files changed, 4 insertions(+), 6 deletions(-)

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: rohm-bdXXX - switch to use i2c probe_new
  2020-04-15  9:50 ` Lee Jones
@ 2020-04-15 10:49   ` Vaittinen, Matti
  2020-04-15 11:04     ` Lee Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Vaittinen, Matti @ 2020-04-15 10:49 UTC (permalink / raw)
  To: lee.jones; +Cc: mazziesaccount, linux-kernel

Hello Lee,

On Wed, 2020-04-15 at 10:50 +0100, Lee Jones wrote:
> On Thu, 26 Mar 2020, Matti Vaittinen wrote:
> 
> > ROHM BD70528 and BD718x7 drivers do not utilize the I2C id.
> > Do the trivial conversion and make them to use probe_new
> > instead of probe.
> 
> Not sure I understand the purpose of the patch.
> 
> The only reason to switch to probe_new is to aid the removal of the
> compulsory I2C tables.  However, neither of these drivers have them.

Maybe I have misunderstood the probe_new. My understanding was that the
probe_new is what should become the standard - Eg. eventually all I2C
drivers would use probe which is not getting the ID tables as argument
- and the old probe could be removed. Thus I thought conversion of
probe to probe_new would be required in order to get rid of the old
probe. I think I got this understanding when I submitted driver for
BD71828 - and I think it was you who suggested me to switch to
probe_new as 'id' was unused. But if please just drop this patch if
this change is not needed!

Thanks for taking a look at this :)

Best Regards
    --Matti

> 
> > Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> > ---
> >  drivers/mfd/rohm-bd70528.c | 5 ++---
> >  drivers/mfd/rohm-bd718x7.c | 5 ++---
> >  2 files changed, 4 insertions(+), 6 deletions(-)


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

* Re: [PATCH] mfd: rohm-bdXXX - switch to use i2c probe_new
  2020-04-15 10:49   ` Vaittinen, Matti
@ 2020-04-15 11:04     ` Lee Jones
  2020-04-15 11:44       ` Vaittinen, Matti
  0 siblings, 1 reply; 6+ messages in thread
From: Lee Jones @ 2020-04-15 11:04 UTC (permalink / raw)
  To: Vaittinen, Matti; +Cc: mazziesaccount, linux-kernel

On Wed, 15 Apr 2020, Vaittinen, Matti wrote:

> Hello Lee,
> 
> On Wed, 2020-04-15 at 10:50 +0100, Lee Jones wrote:
> > On Thu, 26 Mar 2020, Matti Vaittinen wrote:
> > 
> > > ROHM BD70528 and BD718x7 drivers do not utilize the I2C id.
> > > Do the trivial conversion and make them to use probe_new
> > > instead of probe.
> > 
> > Not sure I understand the purpose of the patch.
> > 
> > The only reason to switch to probe_new is to aid the removal of the
> > compulsory I2C tables.  However, neither of these drivers have them.
> 
> Maybe I have misunderstood the probe_new. My understanding was that the
> probe_new is what should become the standard - Eg. eventually all I2C
> drivers would use probe which is not getting the ID tables as argument
> - and the old probe could be removed. Thus I thought conversion of
> probe to probe_new would be required in order to get rid of the old
> probe. I think I got this understanding when I submitted driver for
> BD71828 - and I think it was you who suggested me to switch to
> probe_new as 'id' was unused. But if please just drop this patch if
> this change is not needed!

Some I2C drivers do make use of 'id' though.  So the standard probe
will probably never go away.  I wrote probe_new for drivers that
wished to omit the I2C table.  A better use of your time would be to
go through the original probe users and figure out which I2C tables
can be removed.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: rohm-bdXXX - switch to use i2c probe_new
  2020-04-15 11:04     ` Lee Jones
@ 2020-04-15 11:44       ` Vaittinen, Matti
  2020-04-16  6:31         ` Lee Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Vaittinen, Matti @ 2020-04-15 11:44 UTC (permalink / raw)
  To: lee.jones; +Cc: mazziesaccount, linux-kernel


On Wed, 2020-04-15 at 12:04 +0100, Lee Jones wrote:
> On Wed, 15 Apr 2020, Vaittinen, Matti wrote:
> > Hello Lee,
> > 
> > On Wed, 2020-04-15 at 10:50 +0100, Lee Jones wrote:
> > > On Thu, 26 Mar 2020, Matti Vaittinen wrote:
> > > 
> > > > ROHM BD70528 and BD718x7 drivers do not utilize the I2C id.
> > > > Do the trivial conversion and make them to use probe_new
> > > > instead of probe.
> > > 
> > > Not sure I understand the purpose of the patch.
> > > 
> > > The only reason to switch to probe_new is to aid the removal of
> > > the
> > > compulsory I2C tables.  However, neither of these drivers have
> > > them.
> > 
> > Maybe I have misunderstood the probe_new. My understanding was that
> > the
> > probe_new is what should become the standard - Eg. eventually all
> > I2C
> > drivers would use probe which is not getting the ID tables as
> > argument
> > - and the old probe could be removed. Thus I thought conversion of
> > probe to probe_new would be required in order to get rid of the old
> > probe. I think I got this understanding when I submitted driver for
> > BD71828 - and I think it was you who suggested me to switch to
> > probe_new as 'id' was unused. But if please just drop this patch if
> > this change is not needed!
> 
> Some I2C drivers do make use of 'id' though.  So the standard probe
> will probably never go away.  I wrote probe_new for drivers that
> wished to omit the I2C table.  A better use of your time would be to
> go through the original probe users and figure out which I2C tables
> can be removed.

Right. Unfortunately I don't have problems with excessive amounts of
free time xD I did this probe-conversion for bd718x7 because that
driver is originally written by me - and I try to contribute on
maintenance of stuff I have pushed on your and other maintainer's
shoulders :)

And as I said - if the usage of probe is just as fine as usage of
probe_new - then please just drop this patch :)

Thanks for clarifying this!

Best Regards
    Matti



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

* Re: [PATCH] mfd: rohm-bdXXX - switch to use i2c probe_new
  2020-04-15 11:44       ` Vaittinen, Matti
@ 2020-04-16  6:31         ` Lee Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2020-04-16  6:31 UTC (permalink / raw)
  To: Vaittinen, Matti; +Cc: mazziesaccount, linux-kernel

On Wed, 15 Apr 2020, Vaittinen, Matti wrote:

> 
> On Wed, 2020-04-15 at 12:04 +0100, Lee Jones wrote:
> > On Wed, 15 Apr 2020, Vaittinen, Matti wrote:
> > > Hello Lee,
> > > 
> > > On Wed, 2020-04-15 at 10:50 +0100, Lee Jones wrote:
> > > > On Thu, 26 Mar 2020, Matti Vaittinen wrote:
> > > > 
> > > > > ROHM BD70528 and BD718x7 drivers do not utilize the I2C id.
> > > > > Do the trivial conversion and make them to use probe_new
> > > > > instead of probe.
> > > > 
> > > > Not sure I understand the purpose of the patch.
> > > > 
> > > > The only reason to switch to probe_new is to aid the removal of
> > > > the
> > > > compulsory I2C tables.  However, neither of these drivers have
> > > > them.
> > > 
> > > Maybe I have misunderstood the probe_new. My understanding was that
> > > the
> > > probe_new is what should become the standard - Eg. eventually all
> > > I2C
> > > drivers would use probe which is not getting the ID tables as
> > > argument
> > > - and the old probe could be removed. Thus I thought conversion of
> > > probe to probe_new would be required in order to get rid of the old
> > > probe. I think I got this understanding when I submitted driver for
> > > BD71828 - and I think it was you who suggested me to switch to
> > > probe_new as 'id' was unused. But if please just drop this patch if
> > > this change is not needed!
> > 
> > Some I2C drivers do make use of 'id' though.  So the standard probe
> > will probably never go away.  I wrote probe_new for drivers that
> > wished to omit the I2C table.  A better use of your time would be to
> > go through the original probe users and figure out which I2C tables
> > can be removed.
> 
> Right. Unfortunately I don't have problems with excessive amounts of
> free time xD I did this probe-conversion for bd718x7 because that
> driver is originally written by me - and I try to contribute on
> maintenance of stuff I have pushed on your and other maintainer's
> shoulders :)
> 
> And as I said - if the usage of probe is just as fine as usage of
> probe_new - then please just drop this patch :)

I should revisit the I2C situation at one point.  It does seem silly
to have a 4 year old *new* API.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2020-04-16  6:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26  6:48 [PATCH] mfd: rohm-bdXXX - switch to use i2c probe_new Matti Vaittinen
2020-04-15  9:50 ` Lee Jones
2020-04-15 10:49   ` Vaittinen, Matti
2020-04-15 11:04     ` Lee Jones
2020-04-15 11:44       ` Vaittinen, Matti
2020-04-16  6:31         ` Lee Jones

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