Skip to contentSkip to conversation

clk: switch to simple i2c probe function

PATCH Applied Stephen Kitt 3 participants 32 messages Apr 7, 2022 – Apr 23, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover clk: switch to simple i2c probe function

This series of patches updates i2c probes in clk to use the simple probe variant (simple as in "single argument"), probe_new, following one of two scenarios.

In the first scenario, the existing probe function

int (*probe)(struct i2c_client *client, const struct i2c_device_id *id);

(see struct i2c_driver in include/linux/i2c.h) doesn't use the id argument, so it can be trivially converted to

int (*probe_new)(struct i2c_client *client);

and the i2c_driver declaration updated to use .probe_new instead of .probe.

In the second scenario, the probe function does use the id argument. In this case, the relevant part of the calling code,

        /*
         * 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));
        else
                status = -EINVAL;

(from drivers/i2c/i2c-core-base.c) is moved down into the probe function, typically along the lines of

const struct i2c_device_id *id = i2c_match_id(ids, id);

where ids is the i2c_device_id table. The latter needs to be declared before the probe function; as suggested by Wolfram Sang, the full definition is moved above the probe function.

Changes since v1:
- the pair of patches have been split up into a single patch series with one patch per modified file, and the commit titles adjusted accordingly
- renesas-pcie has been added

Stephen Kitt (10):
clk: cdce706: use simple i2c probe function
clk: cdce925: use i2c_match_id and simple i2c probe
clk: cs2000-cp: use simple i2c probe function
clk: max9485: use simple i2c probe function
clk: si514: use simple i2c probe function
clk: si5341: use simple i2c probe function
clk: si5351: use i2c_match_id and simple i2c probe
clk: si544: use i2c_match_id and simple i2c probe
clk: si570: use i2c_match_id and simple i2c probe
clk: renesas-pcie: use simple i2c probe function

 drivers/clk/clk-cdce706.c      |  5 ++---
 drivers/clk/clk-cdce925.c      | 24 ++++++++++++------------
 drivers/clk/clk-cs2000-cp.c    |  5 ++---
 drivers/clk/clk-max9485.c      |  5 ++---
 drivers/clk/clk-renesas-pcie.c |  4 ++--
 drivers/clk/clk-si514.c        |  5 ++---
 drivers/clk/clk-si5341.c       |  5 ++---
 drivers/clk/clk-si5351.c       | 24 ++++++++++++------------
 drivers/clk/clk-si544.c        | 22 +++++++++++-----------
 drivers/clk/clk-si570.c        | 24 ++++++++++++------------
 10 files changed, 59 insertions(+), 64 deletions(-)
Signature · 1 line
2.27.0
#1 lore raw

PATCH v2 1/10 clk: cdce706: use simple i2c probe function

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

---
 drivers/clk/clk-cdce706.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/clk/clk-cdce706.c +2 -3
index c91e9096b070..5467d941ddfd 100644
@@ -627,8 +627,7 @@ of_clk_cdce_get(struct of_phandle_args *clkspec, void *data)
 	return &cdce->clkout[idx].hw;
 }
 
-static int cdce706_probe(struct i2c_client *client,
-			 const struct i2c_device_id *id)
+static int cdce706_probe(struct i2c_client *client)
 {
 	struct i2c_adapter *adapter = client->adapter;
 	struct cdce706_dev_data *cdce;
@@ -692,7 +691,7 @@ static struct i2c_driver cdce706_i2c_driver = {
 		.name	= "cdce706",
 		.of_match_table = of_match_ptr(cdce706_dt_match),
 	},
-	.probe		= cdce706_probe,
+	.probe_new	= cdce706_probe,
 	.remove		= cdce706_remove,
 	.id_table	= cdce706_id,
 };
Signature · 1 line
2.27.0
Reviewed-by on v2 1/10
#2 lore raw

Re: [PATCH v2 01/10] clk: cdce706: use simple i2c probe function

Quoted 7 lines · Stephen Kitt

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

maintainer Applied
#3 lore raw

Re: [PATCH v2 01/10] clk: cdce706: use simple i2c probe function

In reply to Stephen Kitt

Quoting Stephen Kitt (2022-04-07 08:18:22)

Quoted 8 lines

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

---

Applied to clk-next

#4 lore raw

PATCH v2 2/10 clk: cdce925: use i2c_match_id and simple i2c probe

In reply to Stephen Kitt

As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead.

---
 drivers/clk/clk-cdce925.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/clk/clk-cdce925.c +12 -12
index 308b353815e1..ef9a2d44e40c 100644
@@ -634,11 +634,20 @@ static struct regmap_bus regmap_cdce925_bus = {
 	.read = cdce925_regmap_i2c_read,
 };
 
-static int cdce925_probe(struct i2c_client *client,
-		const struct i2c_device_id *id)
+static const struct i2c_device_id cdce925_id[] = {
+	{ "cdce913", CDCE913 },
+	{ "cdce925", CDCE925 },
+	{ "cdce937", CDCE937 },
+	{ "cdce949", CDCE949 },
+	{ }
+};
+MODULE_DEVICE_TABLE(i2c, cdce925_id);
+
+static int cdce925_probe(struct i2c_client *client)
 {
 	struct clk_cdce925_chip *data;
 	struct device_node *node = client->dev.of_node;
+	const struct i2c_device_id *id = i2c_match_id(cdce925_id, client);
 	const char *parent_name;
 	const char *pll_clk_name[MAX_NUMBER_OF_PLLS] = {NULL,};
 	struct clk_init_data init;
@@ -814,15 +823,6 @@ static int cdce925_probe(struct i2c_client *client,
 	return err;
 }
 
-static const struct i2c_device_id cdce925_id[] = {
-	{ "cdce913", CDCE913 },
-	{ "cdce925", CDCE925 },
-	{ "cdce937", CDCE937 },
-	{ "cdce949", CDCE949 },
-	{ }
-};
-MODULE_DEVICE_TABLE(i2c, cdce925_id);
-
 static const struct of_device_id clk_cdce925_of_match[] = {
 	{ .compatible = "ti,cdce913" },
 	{ .compatible = "ti,cdce925" },
@@ -837,7 +837,7 @@ static struct i2c_driver cdce925_driver = {
 		.name = "cdce925",
 		.of_match_table = of_match_ptr(clk_cdce925_of_match),
 	},
-	.probe		= cdce925_probe,
+	.probe_new	= cdce925_probe,
 	.id_table	= cdce925_id,
 };
 module_i2c_driver(cdce925_driver);
Signature · 1 line
2.27.0
Reviewed-by on v2 2/10
#5 lore raw

Re: [PATCH v2 02/10] clk: cdce925: use i2c_match_id and simple i2c probe

Quoted 6 lines · Stephen Kitt

As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead.

maintainer Applied
#6 lore raw

Re: [PATCH v2 02/10] clk: cdce925: use i2c_match_id and simple i2c probe

In reply to Stephen Kitt

Quoting Stephen Kitt (2022-04-07 08:18:23)

Quoted 7 lines

As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead.

---

Applied to clk-next

#7 lore raw

PATCH v2 3/10 clk: cs2000-cp: use simple i2c probe function

In reply to Stephen Kitt

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

---
 drivers/clk/clk-cs2000-cp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/clk/clk-cs2000-cp.c +2 -3
index dc5040a84dcc..aa5c72bab83e 100644
@@ -570,8 +570,7 @@ static int cs2000_remove(struct i2c_client *client)
 	return 0;
 }
 
-static int cs2000_probe(struct i2c_client *client,
-			const struct i2c_device_id *id)
+static int cs2000_probe(struct i2c_client *client)
 {
 	struct cs2000_priv *priv;
 	struct device *dev = &client->dev;
@@ -625,7 +624,7 @@ static struct i2c_driver cs2000_driver = {
 		.pm	= &cs2000_pm_ops,
 		.of_match_table = cs2000_of_match,
 	},
-	.probe		= cs2000_probe,
+	.probe_new	= cs2000_probe,
 	.remove		= cs2000_remove,
 	.id_table	= cs2000_id,
 };
Signature · 1 line
2.27.0
Reviewed-by on v2 3/10
#8 lore raw

Re: [PATCH v2 03/10] clk: cs2000-cp: use simple i2c probe function

Quoted 7 lines · Stephen Kitt

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

maintainer Applied
#9 lore raw

Re: [PATCH v2 03/10] clk: cs2000-cp: use simple i2c probe function

In reply to Stephen Kitt

Quoting Stephen Kitt (2022-04-07 08:18:24)

Quoted 8 lines

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

---

Applied to clk-next

#10 lore raw

PATCH v2 4/10 clk: max9485: use simple i2c probe function

In reply to Stephen Kitt

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

---
 drivers/clk/clk-max9485.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/clk/clk-max9485.c +2 -3
index 5e80f3d090f3..5f85b0a32872 100644
@@ -254,8 +254,7 @@ max9485_of_clk_get(struct of_phandle_args *clkspec, void *data)
 	return &drvdata->hw[idx].hw;
 }
 
-static int max9485_i2c_probe(struct i2c_client *client,
-			     const struct i2c_device_id *id)
+static int max9485_i2c_probe(struct i2c_client *client)
 {
 	struct max9485_driver_data *drvdata;
 	struct device *dev = &client->dev;
@@ -377,7 +376,7 @@ static struct i2c_driver max9485_driver = {
 		.pm		= &max9485_pm_ops,
 		.of_match_table	= max9485_dt_ids,
 	},
-	.probe = max9485_i2c_probe,
+	.probe_new = max9485_i2c_probe,
 	.id_table = max9485_i2c_ids,
 };
 module_i2c_driver(max9485_driver);
Signature · 1 line
2.27.0
Reviewed-by on v2 4/10
#11 lore raw

Re: [PATCH v2 04/10] clk: max9485: use simple i2c probe function

Quoted 7 lines · Stephen Kitt

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

maintainer Applied
#12 lore raw

Re: [PATCH v2 04/10] clk: max9485: use simple i2c probe function

In reply to Stephen Kitt

Quoting Stephen Kitt (2022-04-07 08:18:25)

Quoted 8 lines

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

---

Applied to clk-next

#13 lore raw

PATCH v2 5/10 clk: si514: use simple i2c probe function

In reply to Stephen Kitt

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

---
 drivers/clk/clk-si514.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/clk/clk-si514.c +2 -3
index 364b62b9928d..4481c4303534 100644
@@ -327,8 +327,7 @@ static const struct regmap_config si514_regmap_config = {
 	.volatile_reg = si514_regmap_is_volatile,
 };
 
-static int si514_probe(struct i2c_client *client,
-		const struct i2c_device_id *id)
+static int si514_probe(struct i2c_client *client)
 {
 	struct clk_si514 *data;
 	struct clk_init_data init;
@@ -394,7 +393,7 @@ static struct i2c_driver si514_driver = {
 		.name = "si514",
 		.of_match_table = clk_si514_of_match,
 	},
-	.probe		= si514_probe,
+	.probe_new	= si514_probe,
 	.remove		= si514_remove,
 	.id_table	= si514_id,
 };
Signature · 1 line
2.27.0
Reviewed-by on v2 5/10
#14 lore raw

Re: [PATCH v2 05/10] clk: si514: use simple i2c probe function

Quoted 7 lines · Stephen Kitt

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

maintainer Applied
#15 lore raw

Re: [PATCH v2 05/10] clk: si514: use simple i2c probe function

In reply to Stephen Kitt

Quoting Stephen Kitt (2022-04-07 08:18:26)

Quoted 8 lines

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

---

Applied to clk-next

#16 lore raw

PATCH v2 6/10 clk: si5341: use simple i2c probe function

In reply to Stephen Kitt

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

---
 drivers/clk/clk-si5341.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/clk/clk-si5341.c +2 -3
index 41851f41b682..4bca73212662 100644
@@ -1547,8 +1547,7 @@ static const struct attribute *si5341_attributes[] = {
 	NULL
 };
 
-static int si5341_probe(struct i2c_client *client,
-		const struct i2c_device_id *id)
+static int si5341_probe(struct i2c_client *client)
 {
 	struct clk_si5341 *data;
 	struct clk_init_data init;
@@ -1837,7 +1836,7 @@ static struct i2c_driver si5341_driver = {
 		.name = "si5341",
 		.of_match_table = clk_si5341_of_match,
 	},
-	.probe		= si5341_probe,
+	.probe_new	= si5341_probe,
 	.remove		= si5341_remove,
 	.id_table	= si5341_id,
 };
Signature · 1 line
2.27.0
Reviewed-by on v2 6/10
#17 lore raw

Re: [PATCH v2 06/10] clk: si5341: use simple i2c probe function

Quoted 7 lines · Stephen Kitt

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

maintainer Applied
#18 lore raw

Re: [PATCH v2 06/10] clk: si5341: use simple i2c probe function

In reply to Stephen Kitt

Quoting Stephen Kitt (2022-04-07 08:18:27)

Quoted 8 lines

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

---

Applied to clk-next

#19 lore raw

PATCH v2 7/10 clk: si5351: use i2c_match_id and simple i2c probe

In reply to Stephen Kitt

As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead.

---
 drivers/clk/clk-si5351.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/clk/clk-si5351.c +12 -12
index 93fa8c9e11be..b9f088c4ba2f 100644
@@ -1367,9 +1367,18 @@ si53351_of_clk_get(struct of_phandle_args *clkspec, void *data)
 }
 #endif /* CONFIG_OF */
 
-static int si5351_i2c_probe(struct i2c_client *client,
-			    const struct i2c_device_id *id)
+static const struct i2c_device_id si5351_i2c_ids[] = {
+	{ "si5351a", SI5351_VARIANT_A },
+	{ "si5351a-msop", SI5351_VARIANT_A3 },
+	{ "si5351b", SI5351_VARIANT_B },
+	{ "si5351c", SI5351_VARIANT_C },
+	{ }
+};
+MODULE_DEVICE_TABLE(i2c, si5351_i2c_ids);
+
+static int si5351_i2c_probe(struct i2c_client *client)
 {
+	const struct i2c_device_id *id = i2c_match_id(si5351_i2c_ids, client);
 	enum si5351_variant variant = (enum si5351_variant)id->driver_data;
 	struct si5351_platform_data *pdata;
 	struct si5351_driver_data *drvdata;
@@ -1649,21 +1658,12 @@ static int si5351_i2c_remove(struct i2c_client *client)
 	return 0;
 }
 
-static const struct i2c_device_id si5351_i2c_ids[] = {
-	{ "si5351a", SI5351_VARIANT_A },
-	{ "si5351a-msop", SI5351_VARIANT_A3 },
-	{ "si5351b", SI5351_VARIANT_B },
-	{ "si5351c", SI5351_VARIANT_C },
-	{ }
-};
-MODULE_DEVICE_TABLE(i2c, si5351_i2c_ids);
-
 static struct i2c_driver si5351_driver = {
 	.driver = {
 		.name = "si5351",
 		.of_match_table = of_match_ptr(si5351_dt_ids),
 	},
-	.probe = si5351_i2c_probe,
+	.probe_new = si5351_i2c_probe,
 	.remove = si5351_i2c_remove,
 	.id_table = si5351_i2c_ids,
 };
Signature · 1 line
2.27.0
Reviewed-by on v2 7/10
#20 lore raw

Re: [PATCH v2 07/10] clk: si5351: use i2c_match_id and simple i2c probe

Quoted 6 lines · Stephen Kitt

As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead.

maintainer Applied
#21 lore raw

Re: [PATCH v2 07/10] clk: si5351: use i2c_match_id and simple i2c probe

In reply to Stephen Kitt

Quoting Stephen Kitt (2022-04-07 08:18:28)

Quoted 7 lines

As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead.

---

Applied to clk-next

#22 lore raw

PATCH v2 8/10 clk: si544: use i2c_match_id and simple i2c probe

In reply to Stephen Kitt

As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead.

---
 drivers/clk/clk-si544.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/clk/clk-si544.c +11 -11
index d9ec9086184d..089786907641 100644
@@ -451,11 +451,19 @@ static const struct regmap_config si544_regmap_config = {
 	.volatile_reg = si544_regmap_is_volatile,
 };
 
-static int si544_probe(struct i2c_client *client,
-		const struct i2c_device_id *id)
+static const struct i2c_device_id si544_id[] = {
+	{ "si544a", si544a },
+	{ "si544b", si544b },
+	{ "si544c", si544c },
+	{ }
+};
+MODULE_DEVICE_TABLE(i2c, si544_id);
+
+static int si544_probe(struct i2c_client *client)
 {
 	struct clk_si544 *data;
 	struct clk_init_data init;
+	const struct i2c_device_id *id = i2c_match_id(si544_id, client);
 	int err;
 
 	data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
@@ -499,14 +507,6 @@ static int si544_probe(struct i2c_client *client,
 	return 0;
 }
 
-static const struct i2c_device_id si544_id[] = {
-	{ "si544a", si544a },
-	{ "si544b", si544b },
-	{ "si544c", si544c },
-	{ }
-};
-MODULE_DEVICE_TABLE(i2c, si544_id);
-
 static const struct of_device_id clk_si544_of_match[] = {
 	{ .compatible = "silabs,si544a" },
 	{ .compatible = "silabs,si544b" },
@@ -520,7 +520,7 @@ static struct i2c_driver si544_driver = {
 		.name = "si544",
 		.of_match_table = clk_si544_of_match,
 	},
-	.probe		= si544_probe,
+	.probe_new	= si544_probe,
 	.id_table	= si544_id,
 };
 module_i2c_driver(si544_driver);
Signature · 1 line
2.27.0
Reviewed-by on v2 8/10
#23 lore raw

Re: [PATCH v2 08/10] clk: si544: use i2c_match_id and simple i2c probe

Quoted 6 lines · Stephen Kitt

As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead.

maintainer Applied
#24 lore raw

Re: [PATCH v2 08/10] clk: si544: use i2c_match_id and simple i2c probe

In reply to Stephen Kitt

Quoting Stephen Kitt (2022-04-07 08:18:29)

Quoted 7 lines

As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead.

---

Applied to clk-next

#25 lore raw

PATCH v2 9/10 clk: si570: use i2c_match_id and simple i2c probe

In reply to Stephen Kitt

As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead.

---
 drivers/clk/clk-si570.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/clk/clk-si570.c +12 -12
index eea50121718a..1ff8f32f734d 100644
@@ -398,11 +398,20 @@ static const struct regmap_config si570_regmap_config = {
 	.volatile_reg = si570_regmap_is_volatile,
 };
 
-static int si570_probe(struct i2c_client *client,
-		const struct i2c_device_id *id)
+static const struct i2c_device_id si570_id[] = {
+	{ "si570", si57x },
+	{ "si571", si57x },
+	{ "si598", si59x },
+	{ "si599", si59x },
+	{ }
+};
+MODULE_DEVICE_TABLE(i2c, si570_id);
+
+static int si570_probe(struct i2c_client *client)
 {
 	struct clk_si570 *data;
 	struct clk_init_data init;
+	const struct i2c_device_id *id = i2c_match_id(si570_id, client);
 	u32 initial_fout, factory_fout, stability;
 	bool skip_recall;
 	int err;
@@ -495,15 +504,6 @@ static int si570_remove(struct i2c_client *client)
 	return 0;
 }
 
-static const struct i2c_device_id si570_id[] = {
-	{ "si570", si57x },
-	{ "si571", si57x },
-	{ "si598", si59x },
-	{ "si599", si59x },
-	{ }
-};
-MODULE_DEVICE_TABLE(i2c, si570_id);
-
 static const struct of_device_id clk_si570_of_match[] = {
 	{ .compatible = "silabs,si570" },
 	{ .compatible = "silabs,si571" },
@@ -518,7 +518,7 @@ static struct i2c_driver si570_driver = {
 		.name = "si570",
 		.of_match_table = clk_si570_of_match,
 	},
-	.probe		= si570_probe,
+	.probe_new	= si570_probe,
 	.remove		= si570_remove,
 	.id_table	= si570_id,
 };
Signature · 1 line
2.27.0
Reviewed-by on v2 9/10
#26 lore raw

Re: [PATCH v2 09/10] clk: si570: use i2c_match_id and simple i2c probe

Quoted 6 lines · Stephen Kitt

As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead.

maintainer Applied
#27 lore raw

Re: [PATCH v2 09/10] clk: si570: use i2c_match_id and simple i2c probe

In reply to Stephen Kitt

Quoting Stephen Kitt (2022-04-07 08:18:30)

Quoted 7 lines

As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead.

---

Applied to clk-next

#28 lore raw

PATCH v2 10/10 clk: renesas-pcie: use simple i2c probe function

In reply to Stephen Kitt

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

---
 drivers/clk/clk-renesas-pcie.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/clk-renesas-pcie.c +2 -2
index 59d9cf0053eb..4f5df1fc74b4 100644
@@ -213,7 +213,7 @@ rs9_of_clk_get(struct of_phandle_args *clkspec, void *data)
 	return rs9->clk_dif[idx];
 }
 
-static int rs9_probe(struct i2c_client *client, const struct i2c_device_id *id)
+static int rs9_probe(struct i2c_client *client)
 {
 	unsigned char name[5] = "DIF0";
 	struct rs9_driver_data *rs9;
@@ -312,7 +312,7 @@ static struct i2c_driver rs9_driver = {
 		.pm	= &rs9_pm_ops,
 		.of_match_table = clk_rs9_of_match,
 	},
-	.probe		= rs9_probe,
+	.probe_new	= rs9_probe,
 	.id_table	= rs9_id,
 };
 module_i2c_driver(rs9_driver);
Signature · 1 line
2.27.0
Reviewed-by on v2 10/10
#29 lore raw

Re: [PATCH v2 01/10] clk: cdce706: use simple i2c probe function

Quoted 7 lines · Stephen Kitt

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

Reviewed-by on v2 10/10
#30 lore raw

Re: [PATCH v2 10/10] clk: renesas-pcie: use simple i2c probe function

In reply to Stephen Kitt
Quoted 7 lines · Stephen Kitt

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

maintainer Applied
#31 lore raw

Re: [PATCH v2 10/10] clk: renesas-pcie: use simple i2c probe function

In reply to Stephen Kitt

Quoting Stephen Kitt (2022-04-07 08:18:31)

Quoted 8 lines

The i2c probe function here doesn't use the id information provided in its second argument, so the single-parameter i2c probe function ("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

---

Applied to clk-next