* [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter
@ 2023-02-26 22:26 Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 1/9] misc: ad525x_dpot-i2c: Convert to i2c's .probe_new() Uwe Kleine-König
` (9 more replies)
0 siblings, 10 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2023-02-26 22:26 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c, Arnd Bergmann, Greg Kroah-Hartman, linux-kernel,
Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Ajay Gupta, Peter Senna Tschudin, Vladimir Oltean, Luca Ceresoli,
linux-mtd, Jiri Slaby, linux-serial, Evgeniy Polyakov, Crt Mori,
Jonathan Cameron, Jean Delvare, Javier Martinez Canillas,
Shunqian Zheng, Mauro Carvalho Chehab, linux-media,
Michael Hennerich, Peter Rosin, Guenter Roeck, Lee Jones
Hello,
this is v2 of the series. I send it a bit earlier than I planned to do that
initially because I failed to send v1 completely to the linux-i2c list.
Changes since (implicit) v1:
- Added Acks for patches #5, #6 and #8
- Fixed kernel doc as pointed out by Luca Ceresoli (patch #7)
- Send all patches to linux-i2c mailing list
- Rebased to current Linus' tree.
This reduces the list of prerequisite patches to two.
I updated
https://git.pengutronix.de/git/ukl/linux i2c-probe-new
accordingly.
Best regards
Uwe
Uwe Kleine-König (9):
misc: ad525x_dpot-i2c: Convert to i2c's .probe_new()
mtd: maps: pismo: Convert to i2c's .probe_new()
serial: sc16is7xx: Convert to i2c's .probe_new()
w1: ds2482: Convert to i2c's .probe_new()
media: i2c: ov5695: convert to i2c's .probe_new()
media: i2c: ov2685: convert to i2c's .probe_new()
i2c: Switch .probe() to not take an id parameter
i2c: mux: Convert all drivers to new .probe() callback
i2c: Convert drivers to new .probe() callback
drivers/i2c/i2c-core-base.c | 13 +++----------
drivers/i2c/i2c-slave-eeprom.c | 2 +-
drivers/i2c/i2c-slave-testunit.c | 2 +-
drivers/i2c/i2c-smbus.c | 2 +-
drivers/i2c/muxes/i2c-mux-ltc4306.c | 2 +-
drivers/i2c/muxes/i2c-mux-pca9541.c | 2 +-
drivers/i2c/muxes/i2c-mux-pca954x.c | 2 +-
drivers/media/i2c/ov2685.c | 5 ++---
drivers/media/i2c/ov5695.c | 5 ++---
drivers/misc/ad525x_dpot-i2c.c | 6 +++---
drivers/mtd/maps/pismo.c | 5 ++---
drivers/tty/serial/sc16is7xx.c | 6 +++---
drivers/w1/masters/ds2482.c | 5 ++---
include/linux/i2c.h | 18 +++++++++++-------
14 files changed, 34 insertions(+), 41 deletions(-)
base-commit: f3a2439f20d918930cc4ae8f76fe1c1afd26958f
prerequisite-patch-id: 256857b4eee79540b271b8d4899b9ba0aa3c4c27
prerequisite-patch-id: bb49c9c71311ac1f1056c562f20f26aa356c95a6
--
2.39.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/9] misc: ad525x_dpot-i2c: Convert to i2c's .probe_new()
2023-02-26 22:26 [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
@ 2023-02-26 22:26 ` Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 2/9] mtd: maps: pismo: " Uwe Kleine-König
` (8 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2023-02-26 22:26 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c, Arnd Bergmann, Greg Kroah-Hartman, linux-kernel
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/lkml/20221118224540.619276-483-uwe@kleine-koenig.org
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/misc/ad525x_dpot-i2c.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/ad525x_dpot-i2c.c b/drivers/misc/ad525x_dpot-i2c.c
index 28ffb4377d98..3856d5c04c5f 100644
--- a/drivers/misc/ad525x_dpot-i2c.c
+++ b/drivers/misc/ad525x_dpot-i2c.c
@@ -50,9 +50,9 @@ static const struct ad_dpot_bus_ops bops = {
.write_r8d16 = write_r8d16,
};
-static int ad_dpot_i2c_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int ad_dpot_i2c_probe(struct i2c_client *client)
{
+ const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct ad_dpot_bus_data bdata = {
.client = client,
.bops = &bops,
@@ -106,7 +106,7 @@ static struct i2c_driver ad_dpot_i2c_driver = {
.driver = {
.name = "ad_dpot",
},
- .probe = ad_dpot_i2c_probe,
+ .probe_new = ad_dpot_i2c_probe,
.remove = ad_dpot_i2c_remove,
.id_table = ad_dpot_id,
};
--
2.39.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 2/9] mtd: maps: pismo: Convert to i2c's .probe_new()
2023-02-26 22:26 [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 1/9] misc: ad525x_dpot-i2c: Convert to i2c's .probe_new() Uwe Kleine-König
@ 2023-02-26 22:26 ` Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 3/9] serial: sc16is7xx: " Uwe Kleine-König
` (7 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2023-02-26 22:26 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c, Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Ajay Gupta, Peter Senna Tschudin, Vladimir Oltean, Luca Ceresoli,
linux-mtd, linux-kernel
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.
Acked-by: Richard Weinberger <richard@nod.at>
Link: https://lore.kernel.org/lkml/20221118224540.619276-497-uwe@kleine-koenig.org
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/mtd/maps/pismo.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/maps/pismo.c b/drivers/mtd/maps/pismo.c
index 5fcefcd0baca..3e0fff3f129e 100644
--- a/drivers/mtd/maps/pismo.c
+++ b/drivers/mtd/maps/pismo.c
@@ -206,8 +206,7 @@ static void pismo_remove(struct i2c_client *client)
kfree(pismo);
}
-static int pismo_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int pismo_probe(struct i2c_client *client)
{
struct pismo_pdata *pdata = client->dev.platform_data;
struct pismo_eeprom eeprom;
@@ -260,7 +259,7 @@ static struct i2c_driver pismo_driver = {
.driver = {
.name = "pismo",
},
- .probe = pismo_probe,
+ .probe_new = pismo_probe,
.remove = pismo_remove,
.id_table = pismo_id,
};
--
2.39.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 3/9] serial: sc16is7xx: Convert to i2c's .probe_new()
2023-02-26 22:26 [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 1/9] misc: ad525x_dpot-i2c: Convert to i2c's .probe_new() Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 2/9] mtd: maps: pismo: " Uwe Kleine-König
@ 2023-02-26 22:26 ` Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 4/9] w1: ds2482: " Uwe Kleine-König
` (6 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2023-02-26 22:26 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
linux-kernel
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/lkml/20221118224540.619276-572-uwe@kleine-koenig.org
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/tty/serial/sc16is7xx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 29c94be09159..abad091baeea 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1666,9 +1666,9 @@ MODULE_ALIAS("spi:sc16is7xx");
#endif
#ifdef CONFIG_SERIAL_SC16IS7XX_I2C
-static int sc16is7xx_i2c_probe(struct i2c_client *i2c,
- const struct i2c_device_id *id)
+static int sc16is7xx_i2c_probe(struct i2c_client *i2c)
{
+ const struct i2c_device_id *id = i2c_client_get_device_id(i2c);
const struct sc16is7xx_devtype *devtype;
struct regmap *regmap;
@@ -1709,7 +1709,7 @@ static struct i2c_driver sc16is7xx_i2c_uart_driver = {
.name = SC16IS7XX_NAME,
.of_match_table = sc16is7xx_dt_ids,
},
- .probe = sc16is7xx_i2c_probe,
+ .probe_new = sc16is7xx_i2c_probe,
.remove = sc16is7xx_i2c_remove,
.id_table = sc16is7xx_i2c_id_table,
};
--
2.39.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 4/9] w1: ds2482: Convert to i2c's .probe_new()
2023-02-26 22:26 [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
` (2 preceding siblings ...)
2023-02-26 22:26 ` [PATCH v2 3/9] serial: sc16is7xx: " Uwe Kleine-König
@ 2023-02-26 22:26 ` Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 5/9] media: i2c: ov5695: convert " Uwe Kleine-König
` (5 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2023-02-26 22:26 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c, Evgeniy Polyakov, Crt Mori, Jonathan Cameron,
Jean Delvare, Javier Martinez Canillas, linux-kernel
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.
Link: https://lore.kernel.org/lkml/20221118224540.619276-596-uwe@kleine-koenig.org
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/w1/masters/ds2482.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c
index 62c44616d8a9..3d8b51316bef 100644
--- a/drivers/w1/masters/ds2482.c
+++ b/drivers/w1/masters/ds2482.c
@@ -442,8 +442,7 @@ static u8 ds2482_w1_set_pullup(void *data, int delay)
}
-static int ds2482_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int ds2482_probe(struct i2c_client *client)
{
struct ds2482_data *data;
int err = -ENODEV;
@@ -553,7 +552,7 @@ static struct i2c_driver ds2482_driver = {
.driver = {
.name = "ds2482",
},
- .probe = ds2482_probe,
+ .probe_new = ds2482_probe,
.remove = ds2482_remove,
.id_table = ds2482_id,
};
--
2.39.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 5/9] media: i2c: ov5695: convert to i2c's .probe_new()
2023-02-26 22:26 [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
` (3 preceding siblings ...)
2023-02-26 22:26 ` [PATCH v2 4/9] w1: ds2482: " Uwe Kleine-König
@ 2023-02-26 22:26 ` Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 6/9] media: i2c: ov2685: " Uwe Kleine-König
` (4 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2023-02-26 22:26 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c, Shunqian Zheng, Mauro Carvalho Chehab, linux-media,
linux-kernel, Kieran Bingham, Hans Verkuil
The probe function doesn't make use of the i2c_device_id * parameter so
it can be trivially converted.
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Link: https://lore.kernel.org/lkml/20221121102705.16092-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/media/i2c/ov5695.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/media/i2c/ov5695.c b/drivers/media/i2c/ov5695.c
index 61906fc54e37..b287c28920a6 100644
--- a/drivers/media/i2c/ov5695.c
+++ b/drivers/media/i2c/ov5695.c
@@ -1267,8 +1267,7 @@ static int ov5695_configure_regulators(struct ov5695 *ov5695)
ov5695->supplies);
}
-static int ov5695_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int ov5695_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
struct ov5695 *ov5695;
@@ -1393,7 +1392,7 @@ static struct i2c_driver ov5695_i2c_driver = {
.pm = &ov5695_pm_ops,
.of_match_table = of_match_ptr(ov5695_of_match),
},
- .probe = &ov5695_probe,
+ .probe_new = &ov5695_probe,
.remove = &ov5695_remove,
};
--
2.39.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 6/9] media: i2c: ov2685: convert to i2c's .probe_new()
2023-02-26 22:26 [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
` (4 preceding siblings ...)
2023-02-26 22:26 ` [PATCH v2 5/9] media: i2c: ov5695: convert " Uwe Kleine-König
@ 2023-02-26 22:26 ` Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 7/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
` (3 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2023-02-26 22:26 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c, Shunqian Zheng, Mauro Carvalho Chehab, linux-media,
linux-kernel, Kieran Bingham, Hans Verkuil
The probe function doesn't make use of the i2c_device_id * parameter so
it can be trivially converted.
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Link: https://lore.kernel.org/lkml/20221121102838.16448-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/media/i2c/ov2685.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/media/i2c/ov2685.c b/drivers/media/i2c/ov2685.c
index a3b524f15d89..1c80b121e7d6 100644
--- a/drivers/media/i2c/ov2685.c
+++ b/drivers/media/i2c/ov2685.c
@@ -707,8 +707,7 @@ static int ov2685_configure_regulators(struct ov2685 *ov2685)
ov2685->supplies);
}
-static int ov2685_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int ov2685_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
struct ov2685 *ov2685;
@@ -830,7 +829,7 @@ static struct i2c_driver ov2685_i2c_driver = {
.pm = &ov2685_pm_ops,
.of_match_table = of_match_ptr(ov2685_of_match),
},
- .probe = &ov2685_probe,
+ .probe_new = &ov2685_probe,
.remove = &ov2685_remove,
};
--
2.39.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 7/9] i2c: Switch .probe() to not take an id parameter
2023-02-26 22:26 [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
` (5 preceding siblings ...)
2023-02-26 22:26 ` [PATCH v2 6/9] media: i2c: ov2685: " Uwe Kleine-König
@ 2023-02-26 22:26 ` Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 8/9] i2c: mux: Convert all drivers to new .probe() callback Uwe Kleine-König
` (2 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2023-02-26 22:26 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c, linux-kernel, Lee Jones
Commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back
type") introduced a new probe callback to convert i2c init routines to
not take an i2c_device_id parameter. Now that all in-tree drivers are
converted to the temporary .probe_new() callback, .probe() can be
modified to match the desired prototype.
Now that .probe() and .probe_new() have the same semantic, they can be
defined as members of an anonymous union to save some memory and
simplify the core code a bit.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/i2c/i2c-core-base.c | 11 ++---------
include/linux/i2c.h | 18 +++++++++++-------
2 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index cb5fa971d67e..63253e2b2c1f 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -561,15 +561,8 @@ static int i2c_device_probe(struct device *dev)
goto err_detach_pm_domain;
}
- /*
- * When there are no more users of probe(),
- * rename probe_new to probe.
- */
- if (driver->probe_new)
- status = driver->probe_new(client);
- else if (driver->probe)
- status = driver->probe(client,
- i2c_match_id(driver->id_table, client));
+ if (driver->probe)
+ status = driver->probe(client);
else
status = -EINVAL;
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 500404d85141..5ba89663ea86 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -236,8 +236,8 @@ 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 - soon to be deprecated
- * @probe_new: New callback for device binding
+ * @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,14 +272,18 @@ enum i2c_driver_flags {
struct i2c_driver {
unsigned int class;
+ union {
/* Standard driver model interfaces */
- int (*probe)(struct i2c_client *client, const struct i2c_device_id *id);
+ 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);
+ };
void (*remove)(struct i2c_client *client);
- /* New driver model interface to aid the seamless removal of the
- * current probe()'s, more commonly unused than used second parameter.
- */
- int (*probe_new)(struct i2c_client *client);
/* driver model interfaces that don't relate to enumeration */
void (*shutdown)(struct i2c_client *client);
--
2.39.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 8/9] i2c: mux: Convert all drivers to new .probe() callback
2023-02-26 22:26 [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
` (6 preceding siblings ...)
2023-02-26 22:26 ` [PATCH v2 7/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
@ 2023-02-26 22:26 ` Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 9/9] i2c: Convert " Uwe Kleine-König
2023-03-03 22:08 ` [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
9 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2023-02-26 22:26 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c, Michael Hennerich, Peter Rosin, Guenter Roeck,
linux-kernel
Now that .probe() was changed not to get the id parameter, drivers can
be converted back to that with the eventual goal to drop .probe_new().
Implement that for the i2c mux drivers.
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/i2c/muxes/i2c-mux-ltc4306.c | 2 +-
drivers/i2c/muxes/i2c-mux-pca9541.c | 2 +-
drivers/i2c/muxes/i2c-mux-pca954x.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/muxes/i2c-mux-ltc4306.c b/drivers/i2c/muxes/i2c-mux-ltc4306.c
index 70835825083f..5a03031519be 100644
--- a/drivers/i2c/muxes/i2c-mux-ltc4306.c
+++ b/drivers/i2c/muxes/i2c-mux-ltc4306.c
@@ -306,7 +306,7 @@ static struct i2c_driver ltc4306_driver = {
.name = "ltc4306",
.of_match_table = of_match_ptr(ltc4306_of_match),
},
- .probe_new = ltc4306_probe,
+ .probe = ltc4306_probe,
.remove = ltc4306_remove,
.id_table = ltc4306_id,
};
diff --git a/drivers/i2c/muxes/i2c-mux-pca9541.c b/drivers/i2c/muxes/i2c-mux-pca9541.c
index 09d1d9e67e31..ce0fb69249a8 100644
--- a/drivers/i2c/muxes/i2c-mux-pca9541.c
+++ b/drivers/i2c/muxes/i2c-mux-pca9541.c
@@ -336,7 +336,7 @@ static struct i2c_driver pca9541_driver = {
.name = "pca9541",
.of_match_table = of_match_ptr(pca9541_of_match),
},
- .probe_new = pca9541_probe,
+ .probe = pca9541_probe,
.remove = pca9541_remove,
.id_table = pca9541_id,
};
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c
index 3639e6d7304c..0ccee2ae5720 100644
--- a/drivers/i2c/muxes/i2c-mux-pca954x.c
+++ b/drivers/i2c/muxes/i2c-mux-pca954x.c
@@ -554,7 +554,7 @@ static struct i2c_driver pca954x_driver = {
.pm = &pca954x_pm,
.of_match_table = pca954x_of_match,
},
- .probe_new = pca954x_probe,
+ .probe = pca954x_probe,
.remove = pca954x_remove,
.id_table = pca954x_id,
};
--
2.39.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 9/9] i2c: Convert drivers to new .probe() callback
2023-02-26 22:26 [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
` (7 preceding siblings ...)
2023-02-26 22:26 ` [PATCH v2 8/9] i2c: mux: Convert all drivers to new .probe() callback Uwe Kleine-König
@ 2023-02-26 22:26 ` Uwe Kleine-König
2023-03-03 22:08 ` [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
9 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2023-02-26 22:26 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c, linux-kernel
Now that .probe() was changed not to get the id parameter, drivers can
be converted back to that with the eventual goal to drop .probe_new().
Implement that for the i2c drivers that are part of the i2c core.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/i2c/i2c-core-base.c | 2 +-
drivers/i2c/i2c-slave-eeprom.c | 2 +-
drivers/i2c/i2c-slave-testunit.c | 2 +-
drivers/i2c/i2c-smbus.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 63253e2b2c1f..ae3af738b03f 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -1050,7 +1050,7 @@ static int dummy_probe(struct i2c_client *client)
static struct i2c_driver dummy_driver = {
.driver.name = "dummy",
- .probe_new = dummy_probe,
+ .probe = dummy_probe,
.id_table = dummy_id,
};
diff --git a/drivers/i2c/i2c-slave-eeprom.c b/drivers/i2c/i2c-slave-eeprom.c
index 5f25f23c4ff8..5946c0d0aef9 100644
--- a/drivers/i2c/i2c-slave-eeprom.c
+++ b/drivers/i2c/i2c-slave-eeprom.c
@@ -207,7 +207,7 @@ static struct i2c_driver i2c_slave_eeprom_driver = {
.driver = {
.name = "i2c-slave-eeprom",
},
- .probe_new = i2c_slave_eeprom_probe,
+ .probe = i2c_slave_eeprom_probe,
.remove = i2c_slave_eeprom_remove,
.id_table = i2c_slave_eeprom_id,
};
diff --git a/drivers/i2c/i2c-slave-testunit.c b/drivers/i2c/i2c-slave-testunit.c
index 75ee7ebdb614..a49642bbae4b 100644
--- a/drivers/i2c/i2c-slave-testunit.c
+++ b/drivers/i2c/i2c-slave-testunit.c
@@ -171,7 +171,7 @@ static struct i2c_driver i2c_slave_testunit_driver = {
.driver = {
.name = "i2c-slave-testunit",
},
- .probe_new = i2c_slave_testunit_probe,
+ .probe = i2c_slave_testunit_probe,
.remove = i2c_slave_testunit_remove,
.id_table = i2c_slave_testunit_id,
};
diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c
index cd19546d31fc..138c3f5e0093 100644
--- a/drivers/i2c/i2c-smbus.c
+++ b/drivers/i2c/i2c-smbus.c
@@ -169,7 +169,7 @@ static struct i2c_driver smbalert_driver = {
.driver = {
.name = "smbus_alert",
},
- .probe_new = smbalert_probe,
+ .probe = smbalert_probe,
.remove = smbalert_remove,
.id_table = smbalert_ids,
};
--
2.39.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter
2023-02-26 22:26 [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
` (8 preceding siblings ...)
2023-02-26 22:26 ` [PATCH v2 9/9] i2c: Convert " Uwe Kleine-König
@ 2023-03-03 22:08 ` Uwe Kleine-König
2023-03-09 21:12 ` Wolfram Sang
9 siblings, 1 reply; 13+ messages in thread
From: Uwe Kleine-König @ 2023-03-03 22:08 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c, Arnd Bergmann, Greg Kroah-Hartman, linux-kernel,
Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Ajay Gupta, Peter Senna Tschudin, Vladimir Oltean, Luca Ceresoli,
linux-mtd, Jiri Slaby, linux-serial, Evgeniy Polyakov, Crt Mori,
Jonathan Cameron, Jean Delvare, Javier Martinez Canillas,
Shunqian Zheng, Mauro Carvalho Chehab, linux-media,
Michael Hennerich, Peter Rosin, Guenter Roeck, Lee Jones
[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]
Hello,
On Sun, Feb 26, 2023 at 11:26:45PM +0100, Uwe Kleine-König wrote:
> this is v2 of the series. I send it a bit earlier than I planned to do that
> initially because I failed to send v1 completely to the linux-i2c list.
>
> Changes since (implicit) v1:
> - Added Acks for patches #5, #6 and #8
> - Fixed kernel doc as pointed out by Luca Ceresoli (patch #7)
> - Send all patches to linux-i2c mailing list
> - Rebased to current Linus' tree.
> This reduces the list of prerequisite patches to two.
>
> I updated
>
> https://git.pengutronix.de/git/ukl/linux i2c-probe-new
>
> accordingly.
Linus tree now contains all patches that are a prerequisite for this
series. I rebased the above branch again on top of linus/master and now
it contains only the change sets included in this series.
Also no unexpected new usages of .probe() appeared in Linus's tree (nor
in next). Also there are no changes to any of the files touched by this
series in next.
So this series is ready to be applied once Linus cuts -rc1.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter
2023-03-03 22:08 ` [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
@ 2023-03-09 21:12 ` Wolfram Sang
2023-03-09 21:19 ` Uwe Kleine-König
0 siblings, 1 reply; 13+ messages in thread
From: Wolfram Sang @ 2023-03-09 21:12 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: linux-i2c, Arnd Bergmann, Greg Kroah-Hartman, linux-kernel,
Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Ajay Gupta, Peter Senna Tschudin, Vladimir Oltean, Luca Ceresoli,
linux-mtd, Jiri Slaby, linux-serial, Evgeniy Polyakov, Crt Mori,
Jonathan Cameron, Jean Delvare, Javier Martinez Canillas,
Shunqian Zheng, Mauro Carvalho Chehab, linux-media,
Michael Hennerich, Peter Rosin, Guenter Roeck, Lee Jones
[-- Attachment #1: Type: text/plain, Size: 137 bytes --]
> So this series is ready to be applied once Linus cuts -rc1.
I applied it to for-current now and plan to have it in -rc2. Thank you!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter
2023-03-09 21:12 ` Wolfram Sang
@ 2023-03-09 21:19 ` Uwe Kleine-König
0 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2023-03-09 21:19 UTC (permalink / raw)
To: Wolfram Sang, linux-i2c, Arnd Bergmann, Greg Kroah-Hartman,
linux-kernel, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Ajay Gupta, Peter Senna Tschudin,
Vladimir Oltean, Luca Ceresoli, linux-mtd, Jiri Slaby,
linux-serial, Evgeniy Polyakov, Crt Mori, Jonathan Cameron,
Jean Delvare, Javier Martinez Canillas, Shunqian Zheng,
Mauro Carvalho Chehab, linux-media, Michael Hennerich,
Peter Rosin, Guenter Roeck, Lee Jones
[-- Attachment #1: Type: text/plain, Size: 612 bytes --]
On Thu, Mar 09, 2023 at 10:12:14PM +0100, Wolfram Sang wrote:
>
> > So this series is ready to be applied once Linus cuts -rc1.
>
> I applied it to for-current now and plan to have it in -rc2. Thank you!
Great, this is even quicker than I anticipated. I thought this will go
into next first and into mainline only during the next merge window.
If you can convince Linus to take that for -rc2, fine for me.
Best regards and thanks,
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-03-09 21:20 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-26 22:26 [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 1/9] misc: ad525x_dpot-i2c: Convert to i2c's .probe_new() Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 2/9] mtd: maps: pismo: " Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 3/9] serial: sc16is7xx: " Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 4/9] w1: ds2482: " Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 5/9] media: i2c: ov5695: convert " Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 6/9] media: i2c: ov2685: " Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 7/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 8/9] i2c: mux: Convert all drivers to new .probe() callback Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 9/9] i2c: Convert " Uwe Kleine-König
2023-03-03 22:08 ` [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
2023-03-09 21:12 ` Wolfram Sang
2023-03-09 21:19 ` Uwe Kleine-König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox