Message ID | 20230626094548.559542-1-u.kleine-koenig@pengutronix.de |
---|---|
State | Deferred |
Headers | show |
Series | i2c: Drop legacy callback .probe_new() | expand |
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>
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>
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
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>
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);
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(-) 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