Skip to contentSkip to conversation

PHY: for 5.2-rc

GIT PULL New Kishon Vijay Abraham I 2 participants 14 messages Jun 12, 2019 – Jul 1, 2019

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

Hi Greg,

Please find the updated pull request for 5.2 -rc cycle. Here I dropped the patch that added "static" for a function to fix sparse warning.

I'm also sending the patches along with this pull request in case you'd like to look them.

Consider merging it in this -rc cycle and let me know if you want me to make any further changes.

Thanks
Kishon

The following changes since commit a188339ca5a396acc588e5851ed7e19f66b0ebd9:

Linux 5.2-rc1 (2019-05-19 15:47:09 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/phy-for-5.2-rc_v2

for you to fetch changes up to e3888cda394c72dcfd450afec1121d9777a59805:

phy: tegra: xusb: Add Tegra210 PLL power supplies (2019-06-12 15:35:44 +0530)

----------------------------------------------------------------
phy: for 5.2-rc

*) Move Tegra124 PLL power supplies to be enabled by xusb-tegra124 *) Move Tegra210 PLL power supplies to be enabled by xusb-tegra210 *) Minor fixes: fix memory leaks at error path and addresses coverity.

----------------------------------------------------------------
Colin Ian King (1):
phy: qcom-qusb2: fix missing assignment of ret when calling clk_prepare_enable

Florian Fainelli (1):
phy: usb: phy-brcm-usb: Remove sysfs attributes upon driver removal

Thierry Reding (3):
dt-bindings: phy: tegra-xusb: List PLL power supplies
phy: tegra: xusb: Add Tegra124 PLL power supplies
phy: tegra: xusb: Add Tegra210 PLL power supplies

Yoshihiro Shimoda (1):
phy: renesas: rcar-gen2: Fix memory leak at error paths

 Documentation/devicetree/bindings/phy/nvidia,tegra124-xusb-padctl.txt | 12 ++++++++++++
 drivers/phy/broadcom/phy-brcm-usb.c                                   |  8 ++++++++
 drivers/phy/qualcomm/phy-qcom-qusb2.c                                 |  2 +-
 drivers/phy/renesas/phy-rcar-gen2.c                                   |  2 ++
 drivers/phy/tegra/xusb-tegra124.c                                     |  9 +++++++++
 drivers/phy/tegra/xusb-tegra210.c                                     |  9 +++++++++
 6 files changed, 41 insertions(+), 1 deletion(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/6 phy: qcom-qusb2: fix missing assignment of ret when calling clk_prepare_enable

From: Colin Ian King <[email protected]>

The error return from the call to clk_prepare_enable is not being assigned to variable ret even though ret is being used to check if the call failed. Fix this by adding in the missing assignment.

Addresses-Coverity: ("Logically dead code")

Fixes 891a96f65ac3 ("phy: qcom-qusb2: Add support for runtime PM")
---
 drivers/phy/qualcomm/phy-qcom-qusb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/qualcomm/phy-qcom-qusb2.c +1 -1
index 1cbf1d6f28ce..bf94a52d3087 100644
@@ -564,7 +564,7 @@ static int __maybe_unused qusb2_phy_runtime_resume(struct device *dev)
 	}
 
 	if (!qphy->has_se_clk_scheme) {
-		clk_prepare_enable(qphy->ref_clk);
+		ret = clk_prepare_enable(qphy->ref_clk);
 		if (ret) {
 			dev_err(dev, "failed to enable ref clk, %d\n", ret);
 			goto disable_ahb_clk;
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/6 phy: renesas: rcar-gen2: Fix memory leak at error paths

In reply to Kishon Vijay Abraham I

From: Yoshihiro Shimoda <[email protected]>

This patch fixes memory leak at error paths of the probe function. In for_each_child_of_node, if the loop returns, the driver should call of_put_node() before returns.

Fixes 1233f59f745b237 ("phy: Renesas R-Car Gen2 PHY driver")
---
 drivers/phy/renesas/phy-rcar-gen2.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/phy/renesas/phy-rcar-gen2.c +2 -0
index 8dc5710d9c98..2926e4937301 100644
@@ -391,6 +391,7 @@ static int rcar_gen2_phy_probe(struct platform_device *pdev)
 		error = of_property_read_u32(np, "reg", &channel_num);
 		if (error || channel_num > 2) {
 			dev_err(dev, "Invalid \"reg\" property\n");
+			of_node_put(np);
 			return error;
 		}
 		channel->select_mask = select_mask[channel_num];
@@ -406,6 +407,7 @@ static int rcar_gen2_phy_probe(struct platform_device *pdev)
 						   data->gen2_phy_ops);
 			if (IS_ERR(phy->phy)) {
 				dev_err(dev, "Failed to create PHY\n");
+				of_node_put(np);
 				return PTR_ERR(phy->phy);
 			}
 			phy_set_drvdata(phy->phy, phy);
Signature · 1 line
2.17.1
#3 lore raw

PATCH 3/6 phy: usb: phy-brcm-usb: Remove sysfs attributes upon driver removal

In reply to Kishon Vijay Abraham I

From: Florian Fainelli <[email protected]>

We are not destroying the sysfs attribute groupe we registered during the probe function which will make subsequent probe calls to that driver fail. Correct that with adding a remove function which only removes those attributes since the reference counting on clocks did its job already.

Fixes 415060b21f31 ("phy: usb: phy-brcm-usb: Add ability to force DRD mode to host or device")
---
 drivers/phy/broadcom/phy-brcm-usb.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/phy/broadcom/phy-brcm-usb.c +8 -0
index f59b1dc30399..292d5b3fc66c 100644
@@ -376,6 +376,13 @@ static int brcm_usb_phy_probe(struct platform_device *pdev)
 	return PTR_ERR_OR_ZERO(phy_provider);
 }
 
+static int brcm_usb_phy_remove(struct platform_device *pdev)
+{
+	sysfs_remove_group(&pdev->dev.kobj, &brcm_usb_phy_group);
+
+	return 0;
+}
+
 #ifdef CONFIG_PM_SLEEP
 static int brcm_usb_phy_suspend(struct device *dev)
 {
@@ -441,6 +448,7 @@ MODULE_DEVICE_TABLE(of, brcm_usb_dt_ids);
 
 static struct platform_driver brcm_usb_driver = {
 	.probe		= brcm_usb_phy_probe,
+	.remove		= brcm_usb_phy_remove,
 	.driver		= {
 		.name	= "brcmstb-usb-phy",
 		.owner	= THIS_MODULE,
Signature · 1 line
2.17.1
#4 lore raw

PATCH 4/6 dt-bindings: phy: tegra-xusb: List PLL power supplies

In reply to Kishon Vijay Abraham I

From: Thierry Reding <[email protected]>

These power supplies provide power for various PLLs that are set up and driven by the XUSB pad controller. These power supplies were previously improperly added to the PCIe and XUSB controllers, but depending on the driver probe order, power to the PLLs will not be supplied soon enough and cause initialization to fail.

---
 .../bindings/phy/nvidia,tegra124-xusb-padctl.txt     | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Documentation/devicetree/bindings/phy/nvidia,tegra124-xusb-padctl.txt +12 -0
index daedb15f322e..9fb682e47c29 100644
@@ -42,6 +42,18 @@ Required properties:
 - reset-names: Must include the following entries:
   - "padctl"
 
+For Tegra124:
+- avdd-pll-utmip-supply: UTMI PLL power supply. Must supply 1.8 V.
+- avdd-pll-erefe-supply: PLLE reference PLL power supply. Must supply 1.05 V.
+- avdd-pex-pll-supply: PCIe/USB3 PLL power supply. Must supply 1.05 V.
+- hvdd-pex-pll-e-supply: High-voltage PLLE power supply. Must supply 3.3 V.
+
+For Tegra210:
+- avdd-pll-utmip-supply: UTMI PLL power supply. Must supply 1.8 V.
+- avdd-pll-uerefe-supply: PLLE reference PLL power supply. Must supply 1.05 V.
+- dvdd-pex-pll-supply: PCIe/USB3 PLL power supply. Must supply 1.05 V.
+- hvdd-pex-pll-e-supply: High-voltage PLLE power supply. Must supply 1.8 V.
+
 For Tegra186:
 - avdd-pll-erefeut-supply: UPHY brick and reference clock as well as UTMI PHY
   power supply. Must supply 1.8 V.
Signature · 1 line
2.17.1
#5 lore raw

PATCH 5/6 phy: tegra: xusb: Add Tegra124 PLL power supplies

In reply to Kishon Vijay Abraham I

From: Thierry Reding <[email protected]>

The Tegra124 SoC has four inputs that consume power in order to supply the PLLs that drive the various USB, PCI and SATA pads.

---
 drivers/phy/tegra/xusb-tegra124.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/phy/tegra/xusb-tegra124.c +9 -0
index c45cbedc6634..254592c47b00 100644
@@ -1721,6 +1721,13 @@ static const struct tegra_xusb_padctl_ops tegra124_xusb_padctl_ops = {
 	.hsic_set_idle = tegra124_hsic_set_idle,
 };
 
+static const char * const tegra124_xusb_padctl_supply_names[] = {
+	"avdd-pll-utmip",
+	"avdd-pll-erefe",
+	"avdd-pex-pll",
+	"hvdd-pex-pll-e",
+};
+
 const struct tegra_xusb_padctl_soc tegra124_xusb_padctl_soc = {
 	.num_pads = ARRAY_SIZE(tegra124_pads),
 	.pads = tegra124_pads,
@@ -1743,6 +1750,8 @@ const struct tegra_xusb_padctl_soc tegra124_xusb_padctl_soc = {
 		},
 	},
 	.ops = &tegra124_xusb_padctl_ops,
+	.supply_names = tegra124_xusb_padctl_supply_names,
+	.num_supplies = ARRAY_SIZE(tegra124_xusb_padctl_supply_names),
 };
 EXPORT_SYMBOL_GPL(tegra124_xusb_padctl_soc);
 
Signature · 1 line
2.17.1
#6 lore raw

PATCH 6/6 phy: tegra: xusb: Add Tegra210 PLL power supplies

In reply to Kishon Vijay Abraham I

From: Thierry Reding <[email protected]>

The Tegra210 SoC has four inputs that consume power in order to supply the PLLs that drive the various USB, PCI and SATA pads.

---
 drivers/phy/tegra/xusb-tegra210.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/phy/tegra/xusb-tegra210.c +9 -0
index 05bee32a3a4d..eb754baa8d71 100644
@@ -2017,6 +2017,13 @@ static const struct tegra_xusb_padctl_ops tegra210_xusb_padctl_ops = {
 	.hsic_set_idle = tegra210_hsic_set_idle,
 };
 
+static const char * const tegra210_xusb_padctl_supply_names[] = {
+	"avdd-pll-utmip",
+	"avdd-pll-uerefe",
+	"dvdd-pex-pll",
+	"hvdd-pex-pll-e",
+};
+
 const struct tegra_xusb_padctl_soc tegra210_xusb_padctl_soc = {
 	.num_pads = ARRAY_SIZE(tegra210_pads),
 	.pads = tegra210_pads,
@@ -2035,6 +2042,8 @@ const struct tegra_xusb_padctl_soc tegra210_xusb_padctl_soc = {
 		},
 	},
 	.ops = &tegra210_xusb_padctl_ops,
+	.supply_names = tegra210_xusb_padctl_supply_names,
+	.num_supplies = ARRAY_SIZE(tegra210_xusb_padctl_supply_names),
 };
 EXPORT_SYMBOL_GPL(tegra210_xusb_padctl_soc);
 
Signature · 1 line
2.17.1
#7 lore raw
In reply to Kishon Vijay Abraham I

Hi Greg,

Quoted 10 lines · Kishon Vijay Abraham I

Hi Greg,

Please find the updated pull request for 5.2 -rc cycle. Here I dropped the patch that added "static" for a function to fix sparse warning.

I'm also sending the patches along with this pull request in case you'd like to look them.

Consider merging it in this -rc cycle and let me know if you want me to make any further changes.

Are you planning to merge this?

Thanks
Kishon

Quoted 48 lines

Thanks
Kishon

The following changes since commit a188339ca5a396acc588e5851ed7e19f66b0ebd9:

Linux 5.2-rc1 (2019-05-19 15:47:09 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/phy-for-5.2-rc_v2

for you to fetch changes up to e3888cda394c72dcfd450afec1121d9777a59805:

phy: tegra: xusb: Add Tegra210 PLL power supplies (2019-06-12 15:35:44 +0530)

----------------------------------------------------------------
phy: for 5.2-rc

*) Move Tegra124 PLL power supplies to be enabled by xusb-tegra124 *) Move Tegra210 PLL power supplies to be enabled by xusb-tegra210 *) Minor fixes: fix memory leaks at error path and addresses coverity.

----------------------------------------------------------------
Colin Ian King (1):
phy: qcom-qusb2: fix missing assignment of ret when calling clk_prepare_enable

Florian Fainelli (1):
phy: usb: phy-brcm-usb: Remove sysfs attributes upon driver removal

Thierry Reding (3):
dt-bindings: phy: tegra-xusb: List PLL power supplies
phy: tegra: xusb: Add Tegra124 PLL power supplies
phy: tegra: xusb: Add Tegra210 PLL power supplies

Yoshihiro Shimoda (1):
phy: renesas: rcar-gen2: Fix memory leak at error paths

 Documentation/devicetree/bindings/phy/nvidia,tegra124-xusb-padctl.txt | 12 ++++++++++++
 drivers/phy/broadcom/phy-brcm-usb.c                                   |  8 ++++++++
 drivers/phy/qualcomm/phy-qcom-qusb2.c                                 |  2 +-
 drivers/phy/renesas/phy-rcar-gen2.c                                   |  2 ++
 drivers/phy/tegra/xusb-tegra124.c                                     |  9 +++++++++
 drivers/phy/tegra/xusb-tegra210.c                                     |  9 +++++++++
 6 files changed, 41 insertions(+), 1 deletion(-)
#8 lore raw
Quoted 8 lines · Kishon Vijay Abraham I

Hi Greg,

Quoted 5 lines · Kishon Vijay Abraham I

Hi Greg,

Please find the updated pull request for 5.2 -rc cycle. Here I dropped the patch that added "static" for a function to fix sparse warning.

Quoted 7 lines
Quoted 5 lines

I'm also sending the patches along with this pull request in case you'd like to look them.

Consider merging it in this -rc cycle and let me know if you want me to make any further changes.

Are you planning to merge this?

Ugh, fell through the cracks of my huge TODO mbox at the moment, sorry. It's still there, should get to it next week...

thanks,

greg k-h

#9 lore raw
Quoted 12 lines · Greg Kroah-Hartman
Quoted 11 lines · Kishon Vijay Abraham I

Hi Greg,

Quoted 8 lines · Kishon Vijay Abraham I

Hi Greg,

Please find the updated pull request for 5.2 -rc cycle. Here I dropped the patch that added "static" for a function to fix sparse warning.

I'm also sending the patches along with this pull request in case you'd like to look them.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Consider merging it in this -rc cycle and let me know if you want me to make any further changes.

Are you planning to merge this?

Ugh, fell through the cracks of my huge TODO mbox at the moment, sorry. It's still there, should get to it next week...

All right, thanks!

-Kishon

#10 lore raw

Hi Greg,

Quoted 18 lines · Kishon Vijay Abraham I
Quoted 15 lines · Greg Kroah-Hartman
Quoted 14 lines · Kishon Vijay Abraham I

Hi Greg,

Quoted 10 lines · Kishon Vijay Abraham I

Hi Greg,

Please find the updated pull request for 5.2 -rc cycle. Here I dropped the patch that added "static" for a function to fix sparse warning.

I'm also sending the patches along with this pull request in case you'd like to look them.

Consider merging it in this -rc cycle and let me know if you want me to make any further changes.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Are you planning to merge this?

Ugh, fell through the cracks of my huge TODO mbox at the moment, sorry. It's still there, should get to it next week...

All right, thanks!

I think it's not merged yet. If you think it's too late, I can send it along with the merge window pull request.

Thanks
Kishon

#11 lore raw
Quoted 23 lines · Kishon Vijay Abraham I

Hi Greg,

Quoted 20 lines · Kishon Vijay Abraham I
Quoted 17 lines · Greg Kroah-Hartman
Quoted 15 lines · Kishon Vijay Abraham I

Hi Greg,

Quoted 10 lines · Kishon Vijay Abraham I

Hi Greg,

Please find the updated pull request for 5.2 -rc cycle. Here I dropped the patch that added "static" for a function to fix sparse warning.

I'm also sending the patches along with this pull request in case you'd like to look them.

Consider merging it in this -rc cycle and let me know if you want me to make any further changes.

Are you planning to merge this?

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Ugh, fell through the cracks of my huge TODO mbox at the moment, sorry. It's still there, should get to it next week...

All right, thanks!

I think it's not merged yet. If you think it's too late, I can send it along with the merge window pull request.

Sorry for the delay, I've merged this into my branch for 5.3-rc1. If anything needed to go into 5.2, can you send the git commit ids to [email protected] when they hit Linus's tree?

thanks,

greg k-h

#12 lore raw

Hi Greg,

Quoted 27 lines · Greg Kroah-Hartman
Quoted 26 lines · Kishon Vijay Abraham I

Hi Greg,

Quoted 23 lines · Kishon Vijay Abraham I
Quoted 19 lines · Greg Kroah-Hartman
Quoted 8 lines · Kishon Vijay Abraham I

Hi Greg,

Quoted 5 lines · Kishon Vijay Abraham I

Hi Greg,

Please find the updated pull request for 5.2 -rc cycle. Here I dropped the patch that added "static" for a function to fix sparse warning.

Quoted 7 lines
Quoted 5 lines

I'm also sending the patches along with this pull request in case you'd like to look them.

Consider merging it in this -rc cycle and let me know if you want me to make any further changes.

Are you planning to merge this?

Ugh, fell through the cracks of my huge TODO mbox at the moment, sorry. It's still there, should get to it next week...

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

All right, thanks!

I think it's not merged yet. If you think it's too late, I can send it along with the merge window pull request.

Sorry for the delay, I've merged this into my branch for 5.3-rc1. If anything needed to go into 5.2, can you send the git commit ids to [email protected] when they hit Linus's tree?

Sure, I'll do that. Meanwhile I've sent pull request for 5.3 merge window. It would be great if you can pick that one too.

Thanks
Kishon

#13 lore raw
Quoted 35 lines · Kishon Vijay Abraham I

Hi Greg,

Quoted 32 lines · Greg Kroah-Hartman
Quoted 30 lines · Kishon Vijay Abraham I

Hi Greg,

Quoted 18 lines · Kishon Vijay Abraham I
Quoted 15 lines · Greg Kroah-Hartman
Quoted 14 lines · Kishon Vijay Abraham I

Hi Greg,

Quoted 10 lines · Kishon Vijay Abraham I

Hi Greg,

Please find the updated pull request for 5.2 -rc cycle. Here I dropped the patch that added "static" for a function to fix sparse warning.

I'm also sending the patches along with this pull request in case you'd like to look them.

Consider merging it in this -rc cycle and let me know if you want me to make any further changes.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Are you planning to merge this?

Ugh, fell through the cracks of my huge TODO mbox at the moment, sorry. It's still there, should get to it next week...

All right, thanks!

I think it's not merged yet. If you think it's too late, I can send it along with the merge window pull request.

Quoted 6 lines
Quoted 3 lines

Sorry for the delay, I've merged this into my branch for 5.3-rc1. If anything needed to go into 5.2, can you send the git commit ids to [email protected] when they hit Linus's tree?

Sure, I'll do that. Meanwhile I've sent pull request for 5.3 merge window. It would be great if you can pick that one too.

Now picked up, thanks.

greg k-h