* [PATCH] i2c: Drop legacy callback .probe_new()
@ 2023-06-26 9:45 Uwe Kleine-König
2023-06-26 12:20 ` Javier Martinez Canillas
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2023-06-26 9:45 UTC (permalink / raw)
To: Wolfram Sang
Cc: Wim Van Sebroeck, Guenter Roeck, Javier Martinez Canillas,
Krzysztof Kozlowski, kernel, linux-i2c, Lee Jones, Liam Girdwood,
Mark Brown, Greg Kroah-Hartman, Dmitry Baryshkov,
Mauro Carvalho Chehab, Hans Verkuil, Pavel Machek, Jean Delvare
Now that all drivers are converted to the (new) .probe() callback, the
temporary .probe_new() can go away. \o/
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,
I was planning to send out this patch for inclusion into next after
v6.5-rc1 as I thought there were only three drivers left to be converted
before (on top of today's next/master). While preparing to submit this
patch I noticed that a few more .probe_new were introduced in next even
after commit 03c835f498b5 ("i2c: Switch .probe() to not take an id
parameter"). I just sent out patches for all drivers in next that are
still using .probe_new. These are:
- w1: ds2482: Switch back to use struct i2c_driver's .probe()
https://lore.kernel.org/lkml/20230612072807.839689-1-u.kleine-koenig@pengutronix.de
Krzysztof Kozlowski already signaled this won't go into 6.5-rc via
his tree, and he's ok if it goes in via i2c then.
- drm/i2c: Switch i2c drivers back to use .probe()
https://lore.kernel.org/dri-devel/20230611202740.826120-1-u.kleine-koenig@pengutronix.de
Currently applied to
https://anongit.freedesktop.org/git/drm/drm-misc.git drm-misc-next
as d13b5d2b2b45. This won't make it onto v6.5-rc1 either.
- watchdog: ziirave_wdt: Switch i2c driver back to use .probe()
https://lore.kernel.org/linux-watchdog/20230525210837.735447-1-u.kleine-koenig@pengutronix.de
Given that the merge window is open now, I doubt this will make it
into v6.5-rc1.
- c4cfa2436ff6 hwmon: max31827: Switch back to use struct i2c_driver::probe
https://lore.kernel.org/linux-hwmon/20230626085145.554616-1-u.kleine-koenig@pengutronix.de
- leds: aw200xx: Switch back to use struct i2c_driver::probe
https://lore.kernel.org/linux-leds/20230626090254.556206-1-u.kleine-koenig@pengutronix.de
- media: i2c: ov01a10: Switch back to use struct i2c_driver::probe
https://lore.kernel.org/linux-media/20230626090533.556406-1-u.kleine-koenig@pengutronix.de
- usb: typec: nb7vpq904m: Switch back to use struct i2c_driver::probe
https://lore.kernel.org/linux-usb/20230626091314.557122-1-u.kleine-koenig@pengutronix.de
- regulator: raa215300: Switch back to use struct i2c_driver::probe
https://lore.kernel.org/lkml/20230626091544.557403-1-u.kleine-koenig@pengutronix.de
- mfd: Switch two more drivers back to use struct i2c_driver::probe
https://lore.kernel.org/lkml/20230626091941.557733-1-u.kleine-koenig@pengutronix.de
The last six were only sent today, so I guess we have to wait another
development cycle and then get this patch into next after v6.6-rc1
(together with the patches from above list that will have failed to get
into v6.6-rc1).
Until we're there, feel free to already look at this patch. I was unsure
if I should split of the change to Documentation/hwmon/pmbus.rst. As
.probe() already works in v6.3-rc2 this hunk could go in already
earlier, e.g. via the hwmon tree. While thinking about that, the hunk
for Documentation/i2c/writing-clients.rst could go in before, too.
So tell me your thoughts, then I can split as desired.
Best regards
Uwe
Documentation/hwmon/pmbus.rst | 2 +-
Documentation/i2c/writing-clients.rst | 2 +-
include/linux/i2c.h | 11 +----------
3 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/Documentation/hwmon/pmbus.rst b/Documentation/hwmon/pmbus.rst
index 7ecfec6ca2db..eb1569bfa676 100644
--- a/Documentation/hwmon/pmbus.rst
+++ b/Documentation/hwmon/pmbus.rst
@@ -163,7 +163,7 @@ Emerson DS1200 power modules might look as follows::
.driver = {
.name = "ds1200",
},
- .probe_new = ds1200_probe,
+ .probe = ds1200_probe,
.id_table = ds1200_id,
};
diff --git a/Documentation/i2c/writing-clients.rst b/Documentation/i2c/writing-clients.rst
index b7d3ae7458f8..41ddc10f1ac7 100644
--- a/Documentation/i2c/writing-clients.rst
+++ b/Documentation/i2c/writing-clients.rst
@@ -46,7 +46,7 @@ driver model device node, and its I2C address.
},
.id_table = foo_idtable,
- .probe_new = foo_probe,
+ .probe = foo_probe,
.remove = foo_remove,
/* if device autodetection is needed: */
.class = I2C_CLASS_SOMETHING,
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 3430cc2b05a6..0dae9db27538 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -237,7 +237,6 @@ enum i2c_driver_flags {
* struct i2c_driver - represent an I2C device driver
* @class: What kind of i2c device we instantiate (for detect)
* @probe: Callback for device binding
- * @probe_new: Transitional callback for device binding - do not use
* @remove: Callback for device unbinding
* @shutdown: Callback for device shutdown
* @alert: Alert callback, for example for the SMBus alert protocol
@@ -272,16 +271,8 @@ enum i2c_driver_flags {
struct i2c_driver {
unsigned int class;
- union {
/* Standard driver model interfaces */
- int (*probe)(struct i2c_client *client);
- /*
- * Legacy callback that was part of a conversion of .probe().
- * Today it has the same semantic as .probe(). Don't use for new
- * code.
- */
- int (*probe_new)(struct i2c_client *client);
- };
+ int (*probe)(struct i2c_client *client);
void (*remove)(struct i2c_client *client);
base-commit: 60e7c4a25da68cd826719b685babbd23e73b85b0
prerequisite-patch-id: de032545ff736a636861fd7d974651c218eb1fb8
prerequisite-patch-id: 2de580c8f961b1d9e3cbf6d8266a6c9e5f0baee3
prerequisite-patch-id: 641b4a15fb6d48fa5609d999405d822a3dca77a0
prerequisite-patch-id: 45fecb72727ea532fbc8ed22b90d12dfbdc6eebc
prerequisite-patch-id: 5a40319dc9ddac96d9c18d8e806ca7b28e1b5552
prerequisite-patch-id: e5e889e4ebbd02acd2698cace289270fce7bf4e6
prerequisite-patch-id: 0b906be4310a9818dc757c197e6536a10efe4b38
prerequisite-patch-id: 4d001a874ac51d3c00caed382b370b3238f8bf8e
prerequisite-patch-id: 8fbcfbcc6ba45bb5e5c4e21d6480bc7ce585fc4f
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: Drop legacy callback .probe_new()
2023-06-26 9:45 [PATCH] i2c: Drop legacy callback .probe_new() Uwe Kleine-König
@ 2023-06-26 12:20 ` Javier Martinez Canillas
2023-06-26 15:46 ` Jean Delvare
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2023-06-26 12:20 UTC (permalink / raw)
To: Uwe Kleine-König, Wolfram Sang
Cc: Wim Van Sebroeck, Guenter Roeck, Krzysztof Kozlowski, kernel,
linux-i2c, Lee Jones, Liam Girdwood, Mark Brown,
Greg Kroah-Hartman, Dmitry Baryshkov, Mauro Carvalho Chehab,
Hans Verkuil, Pavel Machek, Jean Delvare
Hello Uwe,
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes:
> Now that all drivers are converted to the (new) .probe() callback, the
> temporary .probe_new() can go away. \o/
>
For some definition of "temporary" :)
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Hello,
>
> I was planning to send out this patch for inclusion into next after
> v6.5-rc1 as I thought there were only three drivers left to be converted
> before (on top of today's next/master). While preparing to submit this
> patch I noticed that a few more .probe_new were introduced in next even
> after commit 03c835f498b5 ("i2c: Switch .probe() to not take an id
> parameter"). I just sent out patches for all drivers in next that are
> still using .probe_new. These are:
>
> - w1: ds2482: Switch back to use struct i2c_driver's .probe()
> https://lore.kernel.org/lkml/20230612072807.839689-1-u.kleine-koenig@pengutronix.de
> Krzysztof Kozlowski already signaled this won't go into 6.5-rc via
> his tree, and he's ok if it goes in via i2c then.
>
> - drm/i2c: Switch i2c drivers back to use .probe()
> https://lore.kernel.org/dri-devel/20230611202740.826120-1-u.kleine-koenig@pengutronix.de
> Currently applied to
>
> https://anongit.freedesktop.org/git/drm/drm-misc.git drm-misc-next
>
> as d13b5d2b2b45. This won't make it onto v6.5-rc1 either.
>
Right, sorry for not getting that one in time...
[...]
> Until we're there, feel free to already look at this patch. I was unsure
> if I should split of the change to Documentation/hwmon/pmbus.rst. As
> .probe() already works in v6.3-rc2 this hunk could go in already
> earlier, e.g. via the hwmon tree. While thinking about that, the hunk
> for Documentation/i2c/writing-clients.rst could go in before, too.
> So tell me your thoughts, then I can split as desired.
>
I think that would be better to split indeed.
> Best regards
> Uwe
>
[...]
> - union {
> /* Standard driver model interfaces */
> - int (*probe)(struct i2c_client *client);
> - /*
> - * Legacy callback that was part of a conversion of .probe().
> - * Today it has the same semantic as .probe(). Don't use for new
> - * code.
> - */
> - int (*probe_new)(struct i2c_client *client);
> - };
> + int (*probe)(struct i2c_client *client);
> void (*remove)(struct i2c_client *client);
>
Thanks for your persistence to get to this point!
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: Drop legacy callback .probe_new()
2023-06-26 9:45 [PATCH] i2c: Drop legacy callback .probe_new() Uwe Kleine-König
2023-06-26 12:20 ` Javier Martinez Canillas
@ 2023-06-26 15:46 ` Jean Delvare
2023-08-05 16:53 ` Andi Shyti
2023-08-17 11:29 ` Lee Jones
3 siblings, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2023-06-26 15:46 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Wolfram Sang, Wim Van Sebroeck, Guenter Roeck,
Javier Martinez Canillas, Krzysztof Kozlowski, kernel, linux-i2c,
Lee Jones, Liam Girdwood, Mark Brown, Greg Kroah-Hartman,
Dmitry Baryshkov, Mauro Carvalho Chehab, Hans Verkuil,
Pavel Machek
On Mon, 26 Jun 2023 11:45:48 +0200, Uwe Kleine-König wrote:
> Now that all drivers are converted to the (new) .probe() callback, the
> temporary .probe_new() can go away. \o/
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> (...)
Reviewed-by: Jean Delvare <jdelvare@suse.de>
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: Drop legacy callback .probe_new()
2023-06-26 9:45 [PATCH] i2c: Drop legacy callback .probe_new() Uwe Kleine-König
2023-06-26 12:20 ` Javier Martinez Canillas
2023-06-26 15:46 ` Jean Delvare
@ 2023-08-05 16:53 ` Andi Shyti
2023-08-17 11:29 ` Lee Jones
3 siblings, 0 replies; 5+ messages in thread
From: Andi Shyti @ 2023-08-05 16:53 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Wolfram Sang, Wim Van Sebroeck, Guenter Roeck,
Javier Martinez Canillas, Krzysztof Kozlowski, kernel, linux-i2c,
Lee Jones, Liam Girdwood, Mark Brown, Greg Kroah-Hartman,
Dmitry Baryshkov, Mauro Carvalho Chehab, Hans Verkuil,
Pavel Machek, Jean Delvare
Hi,
On Mon, Jun 26, 2023 at 11:45:48AM +0200, Uwe Kleine-König wrote:
> Now that all drivers are converted to the (new) .probe() callback, the
> temporary .probe_new() can go away. \o/
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
this patch has not been taken yet anywhere, so that I'm in time
for
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Andi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: Drop legacy callback .probe_new()
2023-06-26 9:45 [PATCH] i2c: Drop legacy callback .probe_new() Uwe Kleine-König
` (2 preceding siblings ...)
2023-08-05 16:53 ` Andi Shyti
@ 2023-08-17 11:29 ` Lee Jones
3 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2023-08-17 11:29 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Wolfram Sang, Wim Van Sebroeck, Guenter Roeck,
Javier Martinez Canillas, Krzysztof Kozlowski, kernel, linux-i2c,
Liam Girdwood, Mark Brown, Greg Kroah-Hartman, Dmitry Baryshkov,
Mauro Carvalho Chehab, Hans Verkuil, Pavel Machek, Jean Delvare
On Mon, 26 Jun 2023, Uwe Kleine-König wrote:
> Now that all drivers are converted to the (new) .probe() callback, the
> temporary .probe_new() can go away. \o/
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Hello,
>
> I was planning to send out this patch for inclusion into next after
> v6.5-rc1 as I thought there were only three drivers left to be converted
> before (on top of today's next/master). While preparing to submit this
> patch I noticed that a few more .probe_new were introduced in next even
> after commit 03c835f498b5 ("i2c: Switch .probe() to not take an id
> parameter"). I just sent out patches for all drivers in next that are
> still using .probe_new. These are:
>
> - w1: ds2482: Switch back to use struct i2c_driver's .probe()
> https://lore.kernel.org/lkml/20230612072807.839689-1-u.kleine-koenig@pengutronix.de
> Krzysztof Kozlowski already signaled this won't go into 6.5-rc via
> his tree, and he's ok if it goes in via i2c then.
>
> - drm/i2c: Switch i2c drivers back to use .probe()
> https://lore.kernel.org/dri-devel/20230611202740.826120-1-u.kleine-koenig@pengutronix.de
> Currently applied to
>
> https://anongit.freedesktop.org/git/drm/drm-misc.git drm-misc-next
>
> as d13b5d2b2b45. This won't make it onto v6.5-rc1 either.
>
> - watchdog: ziirave_wdt: Switch i2c driver back to use .probe()
> https://lore.kernel.org/linux-watchdog/20230525210837.735447-1-u.kleine-koenig@pengutronix.de
> Given that the merge window is open now, I doubt this will make it
> into v6.5-rc1.
>
> - c4cfa2436ff6 hwmon: max31827: Switch back to use struct i2c_driver::probe
> https://lore.kernel.org/linux-hwmon/20230626085145.554616-1-u.kleine-koenig@pengutronix.de
>
> - leds: aw200xx: Switch back to use struct i2c_driver::probe
> https://lore.kernel.org/linux-leds/20230626090254.556206-1-u.kleine-koenig@pengutronix.de
>
> - media: i2c: ov01a10: Switch back to use struct i2c_driver::probe
> https://lore.kernel.org/linux-media/20230626090533.556406-1-u.kleine-koenig@pengutronix.de
>
> - usb: typec: nb7vpq904m: Switch back to use struct i2c_driver::probe
> https://lore.kernel.org/linux-usb/20230626091314.557122-1-u.kleine-koenig@pengutronix.de
>
> - regulator: raa215300: Switch back to use struct i2c_driver::probe
> https://lore.kernel.org/lkml/20230626091544.557403-1-u.kleine-koenig@pengutronix.de
>
> - mfd: Switch two more drivers back to use struct i2c_driver::probe
> https://lore.kernel.org/lkml/20230626091941.557733-1-u.kleine-koenig@pengutronix.de
>
> The last six were only sent today, so I guess we have to wait another
> development cycle and then get this patch into next after v6.6-rc1
> (together with the patches from above list that will have failed to get
> into v6.6-rc1).
>
> Until we're there, feel free to already look at this patch. I was unsure
> if I should split of the change to Documentation/hwmon/pmbus.rst. As
> .probe() already works in v6.3-rc2 this hunk could go in already
> earlier, e.g. via the hwmon tree. While thinking about that, the hunk
> for Documentation/i2c/writing-clients.rst could go in before, too.
> So tell me your thoughts, then I can split as desired.
>
> Best regards
> Uwe
>
> Documentation/hwmon/pmbus.rst | 2 +-
> Documentation/i2c/writing-clients.rst | 2 +-
> include/linux/i2c.h | 11 +----------
> 3 files changed, 3 insertions(+), 12 deletions(-)
Reviewed-by: Lee Jones <lee@kernel.org>
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-17 11:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-26 9:45 [PATCH] i2c: Drop legacy callback .probe_new() Uwe Kleine-König
2023-06-26 12:20 ` Javier Martinez Canillas
2023-06-26 15:46 ` Jean Delvare
2023-08-05 16:53 ` Andi Shyti
2023-08-17 11:29 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox