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.
 
 Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCgAsFiEEUXMr/TfP2p4suIY5Dlx4XIBNgtkFAl0A0soOHGtpc2hvbkB0
 aS5jb20ACgkQDlx4XIBNgtk/yg//VwD97Xp/omRVFk6SkE5RkmWfmexu97K2yCWD
 Rc0qbjM9hF89XIRuvvQn8QZ1lKloDjdMkurpYW69fn+7T0mUaheW25TQnFqZjlS0
 DKdYM7wPiHq7o/kAV6oturcD8F1BE3y3yZM4W4DpxuBbiIQjBVvtbc6p2sqJIKqv
 l2fX0JElo1AD0/2TCzOLsia/Q0fLHlqeTuHmAMlECLLzgUvDlV741+rg7+aSNebP
 SsuOnBWXXlaMWsn1ziYpC18Hgea2t46ahm5g9/4RFmdrKzILjpZsX2DopQw8PS9t
 JLiZNICeKaiaZV4A+59byBI5bjUoA0DP3xqzd5CYoZMOYFKS2RTqyNOfDG61quL9
 hARgfCzh7gAA7L4o7IhaMKKfusGZ7DwFvyP8LWEX8lnLBDV0Ent3wuf5IIxQqAnV
 dkgpoS6L8YcHhacAXQ5J9hpagGjKXpispJ2vu4YHbD8zSj0ODpnep5dbqUy56fjr
 UMyOwPYG68v88Ey+Gf9GoBkPoUkcEFgJZBF0X9T3lXMzHU0ElRdfP7lkLuDUJpiM
 yNDHgu8k88GuWC8U7lr62N7yH7GvGYI7RJwg5pCk7j42qK7tbhSnmJ+sK0MO/6M5
 RZR5yUVNzI4T/SiYXTHjY7kZS1nPEtvF1TnFE/70sysQXbK6P6QqGG+ipGAwK9Zd
 8XTAdxc=
 =+dGx
 -----END PGP SIGNATURE-----

Merge tag 'phy-for-5.2-rc_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next

Kishon writes:

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.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

* tag 'phy-for-5.2-rc_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy:
  phy: tegra: xusb: Add Tegra210 PLL power supplies
  phy: tegra: xusb: Add Tegra124 PLL power supplies
  dt-bindings: phy: tegra-xusb: List PLL power supplies
  phy: usb: phy-brcm-usb: Remove sysfs attributes upon driver removal
  phy: renesas: rcar-gen2: Fix memory leak at error paths
  phy: qcom-qusb2: fix missing assignment of ret when calling clk_prepare_enable
This commit is contained in:
Greg Kroah-Hartman 2019-07-01 12:11:43 +02:00
commit 90fca07489
6 changed files with 41 additions and 1 deletions

View File

@ -42,6 +42,18 @@ Required properties:
- reset-names: Must include the following entries: - reset-names: Must include the following entries:
- "padctl" - "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: For Tegra186:
- avdd-pll-erefeut-supply: UPHY brick and reference clock as well as UTMI PHY - avdd-pll-erefeut-supply: UPHY brick and reference clock as well as UTMI PHY
power supply. Must supply 1.8 V. power supply. Must supply 1.8 V.

View File

@ -368,6 +368,13 @@ static int brcm_usb_phy_probe(struct platform_device *pdev)
return PTR_ERR_OR_ZERO(phy_provider); 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 #ifdef CONFIG_PM_SLEEP
static int brcm_usb_phy_suspend(struct device *dev) static int brcm_usb_phy_suspend(struct device *dev)
{ {
@ -433,6 +440,7 @@ MODULE_DEVICE_TABLE(of, brcm_usb_dt_ids);
static struct platform_driver brcm_usb_driver = { static struct platform_driver brcm_usb_driver = {
.probe = brcm_usb_phy_probe, .probe = brcm_usb_phy_probe,
.remove = brcm_usb_phy_remove,
.driver = { .driver = {
.name = "brcmstb-usb-phy", .name = "brcmstb-usb-phy",
.owner = THIS_MODULE, .owner = THIS_MODULE,

View File

@ -564,7 +564,7 @@ static int __maybe_unused qusb2_phy_runtime_resume(struct device *dev)
} }
if (!qphy->has_se_clk_scheme) { if (!qphy->has_se_clk_scheme) {
clk_prepare_enable(qphy->ref_clk); ret = clk_prepare_enable(qphy->ref_clk);
if (ret) { if (ret) {
dev_err(dev, "failed to enable ref clk, %d\n", ret); dev_err(dev, "failed to enable ref clk, %d\n", ret);
goto disable_ahb_clk; goto disable_ahb_clk;

View File

@ -391,6 +391,7 @@ static int rcar_gen2_phy_probe(struct platform_device *pdev)
error = of_property_read_u32(np, "reg", &channel_num); error = of_property_read_u32(np, "reg", &channel_num);
if (error || channel_num > 2) { if (error || channel_num > 2) {
dev_err(dev, "Invalid \"reg\" property\n"); dev_err(dev, "Invalid \"reg\" property\n");
of_node_put(np);
return error; return error;
} }
channel->select_mask = select_mask[channel_num]; 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); data->gen2_phy_ops);
if (IS_ERR(phy->phy)) { if (IS_ERR(phy->phy)) {
dev_err(dev, "Failed to create PHY\n"); dev_err(dev, "Failed to create PHY\n");
of_node_put(np);
return PTR_ERR(phy->phy); return PTR_ERR(phy->phy);
} }
phy_set_drvdata(phy->phy, phy); phy_set_drvdata(phy->phy, phy);

View File

@ -1713,6 +1713,13 @@ static const struct tegra_xusb_padctl_ops tegra124_xusb_padctl_ops = {
.hsic_set_idle = tegra124_hsic_set_idle, .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 = { const struct tegra_xusb_padctl_soc tegra124_xusb_padctl_soc = {
.num_pads = ARRAY_SIZE(tegra124_pads), .num_pads = ARRAY_SIZE(tegra124_pads),
.pads = tegra124_pads, .pads = tegra124_pads,
@ -1735,6 +1742,8 @@ const struct tegra_xusb_padctl_soc tegra124_xusb_padctl_soc = {
}, },
}, },
.ops = &tegra124_xusb_padctl_ops, .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); EXPORT_SYMBOL_GPL(tegra124_xusb_padctl_soc);

View File

@ -2009,6 +2009,13 @@ static const struct tegra_xusb_padctl_ops tegra210_xusb_padctl_ops = {
.hsic_set_idle = tegra210_hsic_set_idle, .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 = { const struct tegra_xusb_padctl_soc tegra210_xusb_padctl_soc = {
.num_pads = ARRAY_SIZE(tegra210_pads), .num_pads = ARRAY_SIZE(tegra210_pads),
.pads = tegra210_pads, .pads = tegra210_pads,
@ -2027,6 +2034,8 @@ const struct tegra_xusb_padctl_soc tegra210_xusb_padctl_soc = {
}, },
}, },
.ops = &tegra210_xusb_padctl_ops, .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); EXPORT_SYMBOL_GPL(tegra210_xusb_padctl_soc);