Use i2c_get_match_data() for versa{5,7} drivers
Subsystems (3)
Biju Das
maintainerv2 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
Biju Das
maintainerPATCH 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
@@ -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
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. Usei2c_get_match_data()to get match data for I2C, ACPI and DT-based matching.
Quoted 8 lines
Signed-off-by Biju Das <[email protected]>Reviewed-by Marek Vasut <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>---
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
Re: [PATCH v2 1/2] clk: vc5: Use i2c_get_match_data() instead of device_get_match_data()
In reply to Biju DasQuoting 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. Usei2c_get_match_data()to get match data for I2C, ACPI and DT-based matching.Signed-off-by Biju Das <[email protected]>Reviewed-by Marek Vasut <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>---
Applied to clk-next
Biju Das
maintainerPATCH v2 2/2 clk: vc7: Use i2c_get_match_data() instead of device_get_match_data()
In reply to Biju DasThe 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
@@ -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
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. Usei2c_get_match_data()to get match data for I2C, ACPI and DT-based matching.Signed-off-by Biju Das <[email protected]>Reviewed-by Marek Vasut <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>---
Applied to clk-next