Skip to contentSkip to conversation

Use i2c_get_match_data() for versa{5,7} drivers

PATCH Applied Biju Das 3 participants 6 messages Jul 21, 2023 – Aug 22, 2023

Subsystems (3)

v2 of 3 Applied Latest is v3 →

lore
Share & tools
lore

Biju Das

author maintainer
#0 lore raw

v2 cover Use i2c_get_match_data() for versa{5,7} drivers

Use i2c_get_match_data() to get match data for I2C, ACPI and DT-based matching instead of device_get_match_data() the one for ACPI/DT-based matching.

This patch series is only compile tested.

v1->v2:
* Added Rb tags from Geert and Marek.
* Removed error check as all tables have data pointers.

Biju Das (2):
clk: vc5: Use i2c_get_match_data() instead of device_get_match_data()
clk: vc7: Use i2c_get_match_data() instead of device_get_match_data()

 drivers/clk/clk-versaclock5.c | 2 +-
 drivers/clk/clk-versaclock7.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.25.1
author maintainer
#1 lore raw

PATCH v2 1/2 clk: vc5: Use i2c_get_match_data() instead of device_get_match_data()

The device_get_match_data(), is to get match data for firmware interfaces such as just OF/ACPI. This driver has I2C matching table as well. Use i2c_get_match_data() to get match data for I2C, ACPI and DT-based matching.

---
v1->v2:
* Added Rb tags from Geert and Marek.
* Removed error check as all tables have data pointers.
* Retained Rb tag as the change is trivial.

---
 drivers/clk/clk-versaclock5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-versaclock5.c +1 -1
index 72b432f93b5f..17cbb30d20ad 100644
@@ -955,7 +955,7 @@ static int vc5_probe(struct i2c_client *client)
 
 	i2c_set_clientdata(client, vc5);
 	vc5->client = client;
-	vc5->chip_info = device_get_match_data(&client->dev);
+	vc5->chip_info = i2c_get_match_data(client);
 
 	vc5->pin_xin = devm_clk_get(&client->dev, "xin");
 	if (PTR_ERR(vc5->pin_xin) == -EPROBE_DEFER)
Signature · 1 line
2.25.1
Reviewed-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] clk: vc5: Use i2c_get_match_data() instead of device_get_match_data()

Hello Biju,

Quoted 5 lines · On Fri, 21 Jul 2023 08:00:18 +0100 Biju Das <[email protected]> wrote:

The device_get_match_data(), is to get match data for firmware interfaces such as just OF/ACPI. This driver has I2C matching table as well. Use i2c_get_match_data() to get match data for I2C, ACPI and DT-based matching.

Quoted 8 lines

---
v1->v2:
* Added Rb tags from Geert and Marek.
* Removed error check as all tables have data pointers.
* Retained Rb tag as the change is trivial.

Signature · 3 lines
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
maintainer Applied
#3 lore raw

Re: [PATCH v2 1/2] clk: vc5: Use i2c_get_match_data() instead of device_get_match_data()

In reply to Biju Das

Quoting Biju Das (2023-07-21 00:00:18)

Quoted 9 lines

The device_get_match_data(), is to get match data for firmware interfaces such as just OF/ACPI. This driver has I2C matching table as well. Use i2c_get_match_data() to get match data for I2C, ACPI and DT-based matching.

---

Applied to clk-next

author maintainer
#4 lore raw

PATCH v2 2/2 clk: vc7: Use i2c_get_match_data() instead of device_get_match_data()

In reply to Biju Das

The device_get_match_data(), is to get match data for firmware interfaces such as just OF/ACPI. This driver has I2C matching table as well. Use i2c_get_match_data() to get match data for I2C, ACPI and DT-based matching.

---
v1->v2:
* Added Rb tags from Geert and Marek.
* Removed error check as all tables have data pointers.
* Retained Rb tag as the change is trivial.

---
 drivers/clk/clk-versaclock7.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-versaclock7.c +1 -1
index 7f4361084882..9ab35c1af0ff 100644
@@ -1108,7 +1108,7 @@ static int vc7_probe(struct i2c_client *client)
 
 	i2c_set_clientdata(client, vc7);
 	vc7->client = client;
-	vc7->chip_info = device_get_match_data(&client->dev);
+	vc7->chip_info = i2c_get_match_data(client);
 
 	vc7->pin_xin = devm_clk_get(&client->dev, "xin");
 	if (PTR_ERR(vc7->pin_xin) == -EPROBE_DEFER) {
Signature · 1 line
2.25.1
maintainer Applied
#5 lore raw

Re: [PATCH v2 2/2] clk: vc7: Use i2c_get_match_data() instead of device_get_match_data()

Quoting Biju Das (2023-07-21 00:00:19)

Quoted 9 lines

The device_get_match_data(), is to get match data for firmware interfaces such as just OF/ACPI. This driver has I2C matching table as well. Use i2c_get_match_data() to get match data for I2C, ACPI and DT-based matching.

---

Applied to clk-next