linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Use i2c_get_match_data() for versa{5,7} drivers
@ 2023-07-21  7:00 Biju Das
  2023-07-21  7:00 ` [PATCH v2 1/2] clk: vc5: Use i2c_get_match_data() instead of device_get_match_data() Biju Das
  2023-07-21  7:00 ` [PATCH v2 2/2] clk: vc7: " Biju Das
  0 siblings, 2 replies; 6+ messages in thread
From: Biju Das @ 2023-07-21  7:00 UTC (permalink / raw)
  To: Luca Ceresoli, Michael Turquette, Stephen Boyd
  Cc: Biju Das, linux-clk, Geert Uytterhoeven, Prabhakar Mahadev Lad,
	linux-renesas-soc

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(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/2] clk: vc5: Use i2c_get_match_data() instead of device_get_match_data()
  2023-07-21  7:00 [PATCH v2 0/2] Use i2c_get_match_data() for versa{5,7} drivers Biju Das
@ 2023-07-21  7:00 ` Biju Das
  2023-07-21  8:28   ` Luca Ceresoli
  2023-08-22 20:12   ` Stephen Boyd
  2023-07-21  7:00 ` [PATCH v2 2/2] clk: vc7: " Biju Das
  1 sibling, 2 replies; 6+ messages in thread
From: Biju Das @ 2023-07-21  7:00 UTC (permalink / raw)
  To: Luca Ceresoli, Michael Turquette, Stephen Boyd
  Cc: Biju Das, linux-clk, Geert Uytterhoeven, Prabhakar Mahadev Lad,
	linux-renesas-soc, Marek Vasut

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.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
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(-)

diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c
index 72b432f93b5f..17cbb30d20ad 100644
--- a/drivers/clk/clk-versaclock5.c
+++ b/drivers/clk/clk-versaclock5.c
@@ -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)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/2] clk: vc7: Use i2c_get_match_data() instead of device_get_match_data()
  2023-07-21  7:00 [PATCH v2 0/2] Use i2c_get_match_data() for versa{5,7} drivers Biju Das
  2023-07-21  7:00 ` [PATCH v2 1/2] clk: vc5: Use i2c_get_match_data() instead of device_get_match_data() Biju Das
@ 2023-07-21  7:00 ` Biju Das
  2023-08-22 20:12   ` Stephen Boyd
  1 sibling, 1 reply; 6+ messages in thread
From: Biju Das @ 2023-07-21  7:00 UTC (permalink / raw)
  To: Alex Helms, Michael Turquette, Stephen Boyd
  Cc: Biju Das, linux-clk, Geert Uytterhoeven, Prabhakar Mahadev Lad,
	linux-renesas-soc, Marek Vasut

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.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
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(-)

diff --git a/drivers/clk/clk-versaclock7.c b/drivers/clk/clk-versaclock7.c
index 7f4361084882..9ab35c1af0ff 100644
--- a/drivers/clk/clk-versaclock7.c
+++ b/drivers/clk/clk-versaclock7.c
@@ -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) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] clk: vc5: Use i2c_get_match_data() instead of device_get_match_data()
  2023-07-21  7:00 ` [PATCH v2 1/2] clk: vc5: Use i2c_get_match_data() instead of device_get_match_data() Biju Das
@ 2023-07-21  8:28   ` Luca Ceresoli
  2023-08-22 20:12   ` Stephen Boyd
  1 sibling, 0 replies; 6+ messages in thread
From: Luca Ceresoli @ 2023-07-21  8:28 UTC (permalink / raw)
  To: Biju Das
  Cc: Michael Turquette, Stephen Boyd, linux-clk, Geert Uytterhoeven,
	Prabhakar Mahadev Lad, linux-renesas-soc, Marek Vasut

Hello Biju,

On Fri, 21 Jul 2023 08:00:18 +0100
Biju Das <biju.das.jz@bp.renesas.com> 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.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> 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.

Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 2/2] clk: vc7: Use i2c_get_match_data() instead of device_get_match_data()
  2023-07-21  7:00 ` [PATCH v2 2/2] clk: vc7: " Biju Das
@ 2023-08-22 20:12   ` Stephen Boyd
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2023-08-22 20:12 UTC (permalink / raw)
  To: Alex Helms, Biju Das, Michael Turquette
  Cc: Biju Das, linux-clk, Geert Uytterhoeven, Prabhakar Mahadev Lad,
	linux-renesas-soc, Marek Vasut

Quoting Biju Das (2023-07-21 00:00:19)
> 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.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] clk: vc5: Use i2c_get_match_data() instead of device_get_match_data()
  2023-07-21  7:00 ` [PATCH v2 1/2] clk: vc5: Use i2c_get_match_data() instead of device_get_match_data() Biju Das
  2023-07-21  8:28   ` Luca Ceresoli
@ 2023-08-22 20:12   ` Stephen Boyd
  1 sibling, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2023-08-22 20:12 UTC (permalink / raw)
  To: Biju Das, Luca Ceresoli, Michael Turquette
  Cc: Biju Das, linux-clk, Geert Uytterhoeven, Prabhakar Mahadev Lad,
	linux-renesas-soc, Marek Vasut

Quoting Biju Das (2023-07-21 00:00:18)
> 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.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-08-22 20:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-21  7:00 [PATCH v2 0/2] Use i2c_get_match_data() for versa{5,7} drivers Biju Das
2023-07-21  7:00 ` [PATCH v2 1/2] clk: vc5: Use i2c_get_match_data() instead of device_get_match_data() Biju Das
2023-07-21  8:28   ` Luca Ceresoli
2023-08-22 20:12   ` Stephen Boyd
2023-07-21  7:00 ` [PATCH v2 2/2] clk: vc7: " Biju Das
2023-08-22 20:12   ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).