Skip to contentSkip to conversation

phy: phy-snps-eusb2: fixes and cleanups

PATCH Applied Johan Hovold 5 participants 17 messages May 23, 2025 – Jun 15, 2025 Generic PHY framework

lore
Share & tools
lore
#0 lore raw

cover phy: phy-snps-eusb2: fixes and cleanups

Here are a couple of fixes and some related cleanups to the recently reworked and renamed phy-snps-eusb2 driver.

The clock and repeater imbalance fixes are not marked for stable as the first issue was introduced in the recent rework which is queued for 6.16-rc1.

The repeater imbalance has been there for a few years and could be backported even if this is now complicated by the rework/rename. Since it only affects a resource leak in an error path I decided to not mark this one for stable for now.

Ideally, these could go in along with the reworked driver for rc1.

Johan

Johan Hovold (7):
phy: phy-snps-eusb2: fix clock imbalance on phy_exit()
phy: phy-snps-eusb2: fix repeater imbalance on phy_init() failure
phy: phy-snps-eusb2: rename phy_init() clock error label
phy: phy-snps-eusb2: clean up error messages
phy: phy-snps-eusb2: fix optional phy lookup parameter
phy: phy-snps-eusb2: drop unnecessary loop index declarations
phy: phy-snps-eusb2: clean up id table sentinel

 drivers/phy/phy-snps-eusb2.c | 39 +++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 18 deletions(-)
Signature · 1 line
2.49.0
#1 lore raw

PATCH 1/7 phy: phy-snps-eusb2: fix clock imbalance on phy_exit()

Make sure to disable all clocks enabled at phy_init() also on phy_exit().

Fixes c4098f3e6134 ("phy: phy-snps-eusb2: add support for exynos2200")
Cc Ivaylo Ivanov <[email protected]>
---
 drivers/phy/phy-snps-eusb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/phy-snps-eusb2.c +1 -1
index b73a1d7e57b3..19af3f99692c 100644
@@ -504,7 +504,7 @@ static int snps_eusb2_hsphy_exit(struct phy *p)
 {
 	struct snps_eusb2_hsphy *phy = phy_get_drvdata(p);
 
-	clk_disable_unprepare(phy->ref_clk);
+	clk_bulk_disable_unprepare(phy->data->num_clks, phy->clks);
 
 	regulator_bulk_disable(ARRAY_SIZE(phy->vregs), phy->vregs);
 
Signature · 1 line
2.49.0
Acked-by on v1 1/7
#2 lore raw

Re: [PATCH 1/7] phy: phy-snps-eusb2: fix clock imbalance on phy_exit()

Quoted 15 lines · Johan Hovold

Make sure to disable all clocks enabled at phy_init() also on phy_exit().

Fixes c4098f3e6134 ("phy: phy-snps-eusb2: add support for exynos2200")
Cc Ivaylo Ivanov <[email protected]>
---
 drivers/phy/phy-snps-eusb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/phy-snps-eusb2.c +0 -0
index b73a1d7e57b3..19af3f99692c 100644

drivers/phy/phy-snps-eusb2.c static int snps_eusb2_hsphy_exit(struct phy *p) · line 507

Quoted 5 lines
drivers/phy/phy-snps-eusb2.c +1 -1
@@ -504,7 +504,7 @@ static int snps_eusb2_hsphy_exit(struct phy *p)
 {
 	struct snps_eusb2_hsphy *phy = phy_get_drvdata(p);
 
-	clk_disable_unprepare(phy->ref_clk);
+	clk_bulk_disable_unprepare(phy->data->num_clks, phy->clks);

This shouldn't affect functionality for Exynos 2200, as gates are not handled manually in the clocks driver.

Anyways, this is good to have for other/future supported SoCs.

Best regards,
Ivaylo

Quoted 3 lines
drivers/phy/phy-snps-eusb2.c +0 -0
 	regulator_bulk_disable(ARRAY_SIZE(phy->vregs), phy->vregs);
 
reviewer Reviewed-by on v1 1/7
#3 lore raw

Re: [PATCH 1/7] phy: phy-snps-eusb2: fix clock imbalance on phy_exit()

In reply to Johan Hovold
Quoted 15 lines · Johan Hovold

Make sure to disable all clocks enabled at phy_init() also on phy_exit().

Fixes c4098f3e6134 ("phy: phy-snps-eusb2: add support for exynos2200")
Cc Ivaylo Ivanov <[email protected]>
---
  drivers/phy/phy-snps-eusb2.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/phy-snps-eusb2.c +0 -0
index b73a1d7e57b3..19af3f99692c 100644

drivers/phy/phy-snps-eusb2.c static int snps_eusb2_hsphy_exit(struct phy *p) · line 510

Quoted 8 lines
drivers/phy/phy-snps-eusb2.c +1 -1
@@ -504,7 +504,7 @@ static int snps_eusb2_hsphy_exit(struct phy *p)
  {
  	struct snps_eusb2_hsphy *phy = phy_get_drvdata(p);
 
-	clk_disable_unprepare(phy->ref_clk);
+	clk_bulk_disable_unprepare(phy->data->num_clks, phy->clks);
 
  	regulator_bulk_disable(ARRAY_SIZE(phy->vregs), phy->vregs);
 
#4 lore raw

PATCH 2/7 phy: phy-snps-eusb2: fix repeater imbalance on phy_init() failure

In reply to Johan Hovold

Make sure to disable the repeater PHY also on phy_init() failure.

Fixes 3584f6392f09 ("phy: qcom: phy-qcom-snps-eusb2: Add support for eUSB2 repeater")
Cc Abel Vesa <[email protected]>
Cc Neil Armstrong <[email protected]>
---
 drivers/phy/phy-snps-eusb2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/phy/phy-snps-eusb2.c +3 -2
index 19af3f99692c..a799c3d2bcfb 100644
@@ -468,7 +468,7 @@ static int snps_eusb2_hsphy_init(struct phy *p)
 	ret = clk_bulk_prepare_enable(phy->data->num_clks, phy->clks);
 	if (ret) {
 		dev_err(&p->dev, "failed to enable ref clock, %d\n", ret);
-		goto disable_vreg;
+		goto exit_repeater;
 	}
 
 	ret = reset_control_assert(phy->phy_reset);
@@ -493,7 +493,8 @@ static int snps_eusb2_hsphy_init(struct phy *p)
 
 disable_ref_clk:
 	clk_bulk_disable_unprepare(phy->data->num_clks, phy->clks);
-
+exit_repeater:
+	phy_exit(phy->repeater);
 disable_vreg:
 	regulator_bulk_disable(ARRAY_SIZE(phy->vregs), phy->vregs);
 
Signature · 1 line
2.49.0
reviewer Reviewed-by on v1 2/7
#5 lore raw

Re: [PATCH 2/7] phy: phy-snps-eusb2: fix repeater imbalance on phy_init() failure

Quoted 24 lines · Johan Hovold

Make sure to disable the repeater PHY also on phy_init() failure.

Fixes 3584f6392f09 ("phy: qcom: phy-qcom-snps-eusb2: Add support for eUSB2 repeater")
Cc Abel Vesa <[email protected]>
Cc Neil Armstrong <[email protected]>
---
  drivers/phy/phy-snps-eusb2.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
drivers/phy/phy-snps-eusb2.c +1 -1
index 19af3f99692c..a799c3d2bcfb 100644
@@ -468,7 +468,7 @@ static int snps_eusb2_hsphy_init(struct phy *p)
  	ret = clk_bulk_prepare_enable(phy->data->num_clks, phy->clks);
  	if (ret) {
  		dev_err(&p->dev, "failed to enable ref clock, %d\n", ret);
-		goto disable_vreg;
+		goto exit_repeater;
  	}
 
  	ret = reset_control_assert(phy->phy_reset);

drivers/phy/phy-snps-eusb2.c static int snps_eusb2_hsphy_init(struct phy *p) · line 500

Quoted 9 lines
drivers/phy/phy-snps-eusb2.c +2 -1
@@ -493,7 +493,8 @@ static int snps_eusb2_hsphy_init(struct phy *p)
 
  disable_ref_clk:
  	clk_bulk_disable_unprepare(phy->data->num_clks, phy->clks);
-
+exit_repeater:
+	phy_exit(phy->repeater);
  disable_vreg:
  	regulator_bulk_disable(ARRAY_SIZE(phy->vregs), phy->vregs);
 
#6 lore raw

PATCH 3/7 phy: phy-snps-eusb2: rename phy_init() clock error label

In reply to Johan Hovold

Rename the clock error label which is now used to disable all clocks and not just the ref clock on phy_init() errors.

---
 drivers/phy/phy-snps-eusb2.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/phy/phy-snps-eusb2.c +4 -4
index a799c3d2bcfb..c8f14f8fb9ac 100644
@@ -474,7 +474,7 @@ static int snps_eusb2_hsphy_init(struct phy *p)
 	ret = reset_control_assert(phy->phy_reset);
 	if (ret) {
 		dev_err(&p->dev, "failed to assert phy_reset, %d\n", ret);
-		goto disable_ref_clk;
+		goto disable_clks;
 	}
 
 	usleep_range(100, 150);
@@ -482,16 +482,16 @@ static int snps_eusb2_hsphy_init(struct phy *p)
 	ret = reset_control_deassert(phy->phy_reset);
 	if (ret) {
 		dev_err(&p->dev, "failed to de-assert phy_reset, %d\n", ret);
-		goto disable_ref_clk;
+		goto disable_clks;
 	}
 
 	ret = phy->data->phy_init(p);
 	if (ret)
-		goto disable_ref_clk;
+		goto disable_clks;
 
 	return 0;
 
-disable_ref_clk:
+disable_clks:
 	clk_bulk_disable_unprepare(phy->data->num_clks, phy->clks);
 exit_repeater:
 	phy_exit(phy->repeater);
Signature · 1 line
2.49.0
reviewer Reviewed-by on v1 3/7
#7 lore raw

Re: [PATCH 3/7] phy: phy-snps-eusb2: rename phy_init() clock error label

Quoted 31 lines · Johan Hovold

Rename the clock error label which is now used to disable all clocks and not just the ref clock on phy_init() errors.

---
  drivers/phy/phy-snps-eusb2.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
drivers/phy/phy-snps-eusb2.c +2 -2
index a799c3d2bcfb..c8f14f8fb9ac 100644
@@ -474,7 +474,7 @@ static int snps_eusb2_hsphy_init(struct phy *p)
  	ret = reset_control_assert(phy->phy_reset);
  	if (ret) {
  		dev_err(&p->dev, "failed to assert phy_reset, %d\n", ret);
-		goto disable_ref_clk;
+		goto disable_clks;
  	}
 
  	usleep_range(100, 150);
@@ -482,16 +482,16 @@ static int snps_eusb2_hsphy_init(struct phy *p)
  	ret = reset_control_deassert(phy->phy_reset);
  	if (ret) {
  		dev_err(&p->dev, "failed to de-assert phy_reset, %d\n", ret);
-		goto disable_ref_clk;
+		goto disable_clks;
  	}
 
  	ret = phy->data->phy_init(p);
  	if (ret)

drivers/phy/phy-snps-eusb2.c static int snps_eusb2_hsphy_init(struct phy *p) · line 497

Quoted 10 lines
drivers/phy/phy-snps-eusb2.c +2 -2
-		goto disable_ref_clk;
+		goto disable_clks;
 
  	return 0;
 
-disable_ref_clk:
+disable_clks:
  	clk_bulk_disable_unprepare(phy->data->num_clks, phy->clks);
  exit_repeater:
  	phy_exit(phy->repeater);
#8 lore raw

PATCH 4/7 phy: phy-snps-eusb2: clean up error messages

In reply to Johan Hovold

Clean up the error messages by using a consistent format with a colon followed by a space and an errno (or unsupported frequency).

---
 drivers/phy/phy-snps-eusb2.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/phy/phy-snps-eusb2.c +7 -7
index c8f14f8fb9ac..232c5e8a554f 100644
@@ -256,7 +256,7 @@ static int exynos_eusb2_ref_clk_init(struct snps_eusb2_hsphy *phy)
 	}
 
 	if (!config) {
-		dev_err(&phy->phy->dev, "unsupported ref_clk_freq:%lu\n", ref_clk_freq);
+		dev_err(&phy->phy->dev, "unsupported ref_clk_freq: %lu\n", ref_clk_freq);
 		return -EINVAL;
 	}
 
@@ -293,7 +293,7 @@ static int qcom_eusb2_ref_clk_init(struct snps_eusb2_hsphy *phy)
 	}
 
 	if (!config) {
-		dev_err(&phy->phy->dev, "unsupported ref_clk_freq:%lu\n", ref_clk_freq);
+		dev_err(&phy->phy->dev, "unsupported ref_clk_freq: %lu\n", ref_clk_freq);
 		return -EINVAL;
 	}
 
@@ -461,19 +461,19 @@ static int snps_eusb2_hsphy_init(struct phy *p)
 
 	ret = phy_init(phy->repeater);
 	if (ret) {
-		dev_err(&p->dev, "repeater init failed. %d\n", ret);
+		dev_err(&p->dev, "repeater init failed: %d\n", ret);
 		goto disable_vreg;
 	}
 
 	ret = clk_bulk_prepare_enable(phy->data->num_clks, phy->clks);
 	if (ret) {
-		dev_err(&p->dev, "failed to enable ref clock, %d\n", ret);
+		dev_err(&p->dev, "failed to enable ref clock: %d\n", ret);
 		goto exit_repeater;
 	}
 
 	ret = reset_control_assert(phy->phy_reset);
 	if (ret) {
-		dev_err(&p->dev, "failed to assert phy_reset, %d\n", ret);
+		dev_err(&p->dev, "failed to assert phy_reset: %d\n", ret);
 		goto disable_clks;
 	}
 
@@ -481,7 +481,7 @@ static int snps_eusb2_hsphy_init(struct phy *p)
 
 	ret = reset_control_deassert(phy->phy_reset);
 	if (ret) {
-		dev_err(&p->dev, "failed to de-assert phy_reset, %d\n", ret);
+		dev_err(&p->dev, "failed to de-assert phy_reset: %d\n", ret);
 		goto disable_clks;
 	}
 
@@ -588,7 +588,7 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
 
 	generic_phy = devm_phy_create(dev, NULL, &snps_eusb2_hsphy_ops);
 	if (IS_ERR(generic_phy)) {
-		dev_err(dev, "failed to create phy %d\n", ret);
+		dev_err(dev, "failed to create phy: %d\n", ret);
 		return PTR_ERR(generic_phy);
 	}
 
Signature · 1 line
2.49.0
reviewer Reviewed-by on v1 4/7
#9 lore raw

Re: [PATCH 4/7] phy: phy-snps-eusb2: clean up error messages

Quoted 63 lines · Johan Hovold

Clean up the error messages by using a consistent format with a colon followed by a space and an errno (or unsupported frequency).

---
  drivers/phy/phy-snps-eusb2.c | 14 +++++++-------
  1 file changed, 7 insertions(+), 7 deletions(-)
drivers/phy/phy-snps-eusb2.c +6 -6
index c8f14f8fb9ac..232c5e8a554f 100644
@@ -256,7 +256,7 @@ static int exynos_eusb2_ref_clk_init(struct snps_eusb2_hsphy *phy)
  	}
 
  	if (!config) {
-		dev_err(&phy->phy->dev, "unsupported ref_clk_freq:%lu\n", ref_clk_freq);
+		dev_err(&phy->phy->dev, "unsupported ref_clk_freq: %lu\n", ref_clk_freq);
  		return -EINVAL;
  	}
 
@@ -293,7 +293,7 @@ static int qcom_eusb2_ref_clk_init(struct snps_eusb2_hsphy *phy)
  	}
 
  	if (!config) {
-		dev_err(&phy->phy->dev, "unsupported ref_clk_freq:%lu\n", ref_clk_freq);
+		dev_err(&phy->phy->dev, "unsupported ref_clk_freq: %lu\n", ref_clk_freq);
  		return -EINVAL;
  	}
 
@@ -461,19 +461,19 @@ static int snps_eusb2_hsphy_init(struct phy *p)
 
  	ret = phy_init(phy->repeater);
  	if (ret) {
-		dev_err(&p->dev, "repeater init failed. %d\n", ret);
+		dev_err(&p->dev, "repeater init failed: %d\n", ret);
  		goto disable_vreg;
  	}
 
  	ret = clk_bulk_prepare_enable(phy->data->num_clks, phy->clks);
  	if (ret) {
-		dev_err(&p->dev, "failed to enable ref clock, %d\n", ret);
+		dev_err(&p->dev, "failed to enable ref clock: %d\n", ret);
  		goto exit_repeater;
  	}
 
  	ret = reset_control_assert(phy->phy_reset);
  	if (ret) {
-		dev_err(&p->dev, "failed to assert phy_reset, %d\n", ret);
+		dev_err(&p->dev, "failed to assert phy_reset: %d\n", ret);
  		goto disable_clks;
  	}
 
@@ -481,7 +481,7 @@ static int snps_eusb2_hsphy_init(struct phy *p)
 
  	ret = reset_control_deassert(phy->phy_reset);
  	if (ret) {
-		dev_err(&p->dev, "failed to de-assert phy_reset, %d\n", ret);
+		dev_err(&p->dev, "failed to de-assert phy_reset: %d\n", ret);
  		goto disable_clks;
  	}
 

drivers/phy/phy-snps-eusb2.c static int snps_eusb2_hsphy_probe(struct platform_device *pdev) · line 594

Quoted 8 lines
drivers/phy/phy-snps-eusb2.c +1 -1
@@ -588,7 +588,7 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
 
  	generic_phy = devm_phy_create(dev, NULL, &snps_eusb2_hsphy_ops);
  	if (IS_ERR(generic_phy)) {
-		dev_err(dev, "failed to create phy %d\n", ret);
+		dev_err(dev, "failed to create phy: %d\n", ret);
  		return PTR_ERR(generic_phy);
  	}
 
#10 lore raw

PATCH 5/7 phy: phy-snps-eusb2: fix optional phy lookup parameter

In reply to Johan Hovold

The devm_of_phy_optional_get() takes an optional name argument as its third parameter and not an index like the recently replaced devm_of_phy_get_by_index().

Replace 0 with an explicit NULL for consistency and readability.

---
 drivers/phy/phy-snps-eusb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/phy-snps-eusb2.c +1 -1
index 232c5e8a554f..328e67ebfe03 100644
@@ -581,7 +581,7 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
 		return dev_err_probe(dev, ret,
 				     "failed to get regulator supplies\n");
 
-	phy->repeater = devm_of_phy_optional_get(dev, np, 0);
+	phy->repeater = devm_of_phy_optional_get(dev, np, NULL);
 	if (IS_ERR(phy->repeater))
 		return dev_err_probe(dev, PTR_ERR(phy->repeater),
 				     "failed to get repeater\n");
Signature · 1 line
2.49.0
reviewer Reviewed-by on v1 5/7
#11 lore raw

Re: [PATCH 5/7] phy: phy-snps-eusb2: fix optional phy lookup parameter

Quoted 16 lines · Johan Hovold

The devm_of_phy_optional_get() takes an optional name argument as its third parameter and not an index like the recently replaced devm_of_phy_get_by_index().

Replace 0 with an explicit NULL for consistency and readability.

---
  drivers/phy/phy-snps-eusb2.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/phy-snps-eusb2.c +0 -0
index 232c5e8a554f..328e67ebfe03 100644

drivers/phy/phy-snps-eusb2.c static int snps_eusb2_hsphy_probe(struct platform_device *pdev) · line 587

Quoted 8 lines
drivers/phy/phy-snps-eusb2.c +1 -1
@@ -581,7 +581,7 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
  		return dev_err_probe(dev, ret,
  				     "failed to get regulator supplies\n");
 
-	phy->repeater = devm_of_phy_optional_get(dev, np, 0);
+	phy->repeater = devm_of_phy_optional_get(dev, np, NULL);
  	if (IS_ERR(phy->repeater))
  		return dev_err_probe(dev, PTR_ERR(phy->repeater),
  				     "failed to get repeater\n");
#12 lore raw

PATCH 6/7 phy: phy-snps-eusb2: drop unnecessary loop index declarations

In reply to Johan Hovold

There is already a loop index variable declared at function scope so drop the unnecessary overloaded loop declarations.

---
 drivers/phy/phy-snps-eusb2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/phy-snps-eusb2.c +2 -2
index 328e67ebfe03..c67712bd8bba 100644
@@ -552,7 +552,7 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
 	if (!phy->clks)
 		return -ENOMEM;
 
-	for (int i = 0; i < phy->data->num_clks; ++i)
+	for (i = 0; i < phy->data->num_clks; ++i)
 		phy->clks[i].id = phy->data->clk_names[i];
 
 	ret = devm_clk_bulk_get(dev, phy->data->num_clks, phy->clks);
@@ -561,7 +561,7 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
 				     "failed to get phy clock(s)\n");
 
 	phy->ref_clk = NULL;
-	for (int i = 0; i < phy->data->num_clks; ++i) {
+	for (i = 0; i < phy->data->num_clks; ++i) {
 		if (!strcmp(phy->clks[i].id, "ref")) {
 			phy->ref_clk = phy->clks[i].clk;
 			break;
Signature · 1 line
2.49.0
reviewer Reviewed-by on v1 6/7
#13 lore raw

Re: [PATCH 6/7] phy: phy-snps-eusb2: drop unnecessary loop index declarations

Quoted 22 lines · Johan Hovold

There is already a loop index variable declared at function scope so drop the unnecessary overloaded loop declarations.

---
  drivers/phy/phy-snps-eusb2.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/phy-snps-eusb2.c +1 -1
index 328e67ebfe03..c67712bd8bba 100644
@@ -552,7 +552,7 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
  	if (!phy->clks)
  		return -ENOMEM;
 
-	for (int i = 0; i < phy->data->num_clks; ++i)
+	for (i = 0; i < phy->data->num_clks; ++i)
  		phy->clks[i].id = phy->data->clk_names[i];
 
  	ret = devm_clk_bulk_get(dev, phy->data->num_clks, phy->clks);

drivers/phy/phy-snps-eusb2.c static int snps_eusb2_hsphy_probe(struct platform_device *pdev) · line 567

Quoted 8 lines
drivers/phy/phy-snps-eusb2.c +1 -1
@@ -561,7 +561,7 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
  				     "failed to get phy clock(s)\n");
 
  	phy->ref_clk = NULL;
-	for (int i = 0; i < phy->data->num_clks; ++i) {
+	for (i = 0; i < phy->data->num_clks; ++i) {
  		if (!strcmp(phy->clks[i].id, "ref")) {
  			phy->ref_clk = phy->clks[i].clk;
  			break;
#14 lore raw

PATCH 7/7 phy: phy-snps-eusb2: clean up id table sentinel

In reply to Johan Hovold

Use a more common format for the id table sentinel for consistency and symmetry.

---
 drivers/phy/phy-snps-eusb2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/phy/phy-snps-eusb2.c +3 -1
index c67712bd8bba..cf62f2221366 100644
@@ -611,7 +611,9 @@ static const struct of_device_id snps_eusb2_hsphy_of_match_table[] = {
 	}, {
 		.compatible = "samsung,exynos2200-eusb2-phy",
 		.data = &exynos2200_snps_eusb2_phy,
-	}, { },
+	}, {
+		/* sentinel */
+	}
 };
 MODULE_DEVICE_TABLE(of, snps_eusb2_hsphy_of_match_table);
 
Signature · 1 line
2.49.0
Reviewed-by on the v1 series
#15 lore raw
In reply to Johan Hovold
Quoted 17 lines · Johan Hovold

Here are a couple of fixes and some related cleanups to the recently reworked and renamed phy-snps-eusb2 driver.

The clock and repeater imbalance fixes are not marked for stable as the first issue was introduced in the recent rework which is queued for 6.16-rc1.

The repeater imbalance has been there for a few years and could be backported even if this is now complicated by the rework/rename. Since it only affects a resource leak in an error path I decided to not mark this one for stable for now.

Ideally, these could go in along with the reworked driver for rc1.

Johan

Quoted 8 lines

Johan Hovold (7):
phy: phy-snps-eusb2: fix clock imbalance on phy_exit()
phy: phy-snps-eusb2: fix repeater imbalance on phy_init() failure
phy: phy-snps-eusb2: rename phy_init() clock error label
phy: phy-snps-eusb2: clean up error messages
phy: phy-snps-eusb2: fix optional phy lookup parameter
phy: phy-snps-eusb2: drop unnecessary loop index declarations
phy: phy-snps-eusb2: clean up id table sentinel

Really straightforward. So for the entire series:

maintainer Applied
#16 lore raw
In reply to Johan Hovold
Quoted 8 lines · Johan Hovold

Here are a couple of fixes and some related cleanups to the recently reworked and renamed phy-snps-eusb2 driver.

The clock and repeater imbalance fixes are not marked for stable as the first issue was introduced in the recent rework which is queued for 6.16-rc1.

[...]

Applied, thanks!

[1/7] phy: phy-snps-eusb2: fix clock imbalance on phy_exit()

      commit: 641fa5b515a6900b1452cc92d30d1ab391e04414
[2/7] phy: phy-snps-eusb2: fix repeater imbalance on phy_init() failure
      commit: 3232a6b0d834569f71aa898401288af6b4ab781d
[3/7] phy: phy-snps-eusb2: rename phy_init() clock error label
      commit: 4f333990841e06059c3cd7251791017d4c9e9028
[4/7] phy: phy-snps-eusb2: clean up error messages
      commit: b7996f8e9473cf8a594af1fa1bb799f8f28c0670
[5/7] phy: phy-snps-eusb2: fix optional phy lookup parameter
      commit: f21b9bea6bc29de88b885cecd5e4f0ada60d4700
[6/7] phy: phy-snps-eusb2: drop unnecessary loop index declarations
      commit: d2d0ae723ba3fca2c54dfbc758b368d3009e79a7
[7/7] phy: phy-snps-eusb2: clean up id table sentinel
      commit: 47311eaa0a3be575f7835d99e3767f5ee5940b45

Best regards,

Signature · 1 line
~Vinod