Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1330924 > unrolled thread
| Started by | Kishon Vijay Abraham I <kishon@ti.com> |
|---|---|
| First post | 2016-02-10 07:50 +0100 |
| Last post | 2016-02-12 05:20 +0100 |
| Articles | 6 — 2 participants |
Back to article view | Back to linux.kernel
[GIT PULL] phy: for-4.5 -rc cycle Kishon Vijay Abraham I <kishon@ti.com> - 2016-02-10 07:50 +0100
[PATCH 2/4] phy: core: fix wrong err handle for phy_power_on Kishon Vijay Abraham I <kishon@ti.com> - 2016-02-10 07:50 +0100
[PATCH 3/4] phy: twl4030-usb: Relase usb phy on unload Kishon Vijay Abraham I <kishon@ti.com> - 2016-02-10 07:50 +0100
[PATCH 4/4] phy: twl4030-usb: Fix unbalanced pm_runtime_enable on module reload Kishon Vijay Abraham I <kishon@ti.com> - 2016-02-10 07:50 +0100
[PATCH 1/4] phy: Restrict phy-hi6220-usb to HiSilicon arm64 Kishon Vijay Abraham I <kishon@ti.com> - 2016-02-10 07:50 +0100
Re: [GIT PULL] phy: for-4.5 -rc cycle Greg KH <gregkh@linuxfoundation.org> - 2016-02-12 05:20 +0100
| From | Kishon Vijay Abraham I <kishon@ti.com> |
|---|---|
| Date | 2016-02-10 07:50 +0100 |
| Subject | [GIT PULL] phy: for-4.5 -rc cycle |
| Message-ID | <r0wL8-76e-3@gated-at.bofh.it> |
Hi Greg,
Please find the pull request for this -rc cycle below. It contains a fix in
phy core, twl4030-usb phy driver and a fix in Kconfig.
Consider merging it to this -rc cycle. Let me know if you want me to change
anything.
Cheers
Kishon
The following changes since commit 92e963f50fc74041b5e9e744c330dca48e04f08d:
Linux 4.5-rc1 (2016-01-24 13:06:47 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/phy-for-4.5-rc
for you to fetch changes up to 58a66dba1beac2121d931cda4682ae4d40816af5:
phy: twl4030-usb: Fix unbalanced pm_runtime_enable on module reload (2016-02-10 11:46:01 +0530)
----------------------------------------------------------------
phy: for 4.5-rc
*) Fix error handling code in phy core [phy_power_on()]
*) phy-twl4030-usb fixes for unloading the module
*) Restrict phy-hi6220-usb to HiSilicon arm64
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
----------------------------------------------------------------
Geert Uytterhoeven (1):
phy: Restrict phy-hi6220-usb to HiSilicon arm64
Shawn Lin (1):
phy: core: fix wrong err handle for phy_power_on
Tony Lindgren (2):
phy: twl4030-usb: Relase usb phy on unload
phy: twl4030-usb: Fix unbalanced pm_runtime_enable on module reload
drivers/phy/Kconfig | 1 +
drivers/phy/phy-core.c | 16 +++++++++-------
drivers/phy/phy-twl4030-usb.c | 14 +++++++++-----
3 files changed, 19 insertions(+), 12 deletions(-)
--
1.7.9.5
[toc] | [next] | [standalone]
| From | Kishon Vijay Abraham I <kishon@ti.com> |
|---|---|
| Date | 2016-02-10 07:50 +0100 |
| Subject | [PATCH 2/4] phy: core: fix wrong err handle for phy_power_on |
| Message-ID | <r0wL8-76e-5@gated-at.bofh.it> |
| In reply to | #1330924 |
From: Shawn Lin <shawn.lin@rock-chips.com>
If phy_pm_runtime_get_sync failed but we already
enable regulator, current code return directly without
doing regulator_disable. This patch fix this problem
and cleanup err handle of phy_power_on to be more readable.
Fixes: 3be88125d85d ("phy: core: Support regulator ...")
Cc: <stable@vger.kernel.org> # v3.18+
Cc: Roger Quadros <rogerq@ti.com>
Cc: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
drivers/phy/phy-core.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 8c7f27d..e7e574d 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -275,20 +275,21 @@ EXPORT_SYMBOL_GPL(phy_exit);
int phy_power_on(struct phy *phy)
{
- int ret;
+ int ret = 0;
if (!phy)
- return 0;
+ goto out;
if (phy->pwr) {
ret = regulator_enable(phy->pwr);
if (ret)
- return ret;
+ goto out;
}
ret = phy_pm_runtime_get_sync(phy);
if (ret < 0 && ret != -ENOTSUPP)
- return ret;
+ goto err_pm_sync;
+
ret = 0; /* Override possible ret == -ENOTSUPP */
mutex_lock(&phy->mutex);
@@ -296,19 +297,20 @@ int phy_power_on(struct phy *phy)
ret = phy->ops->power_on(phy);
if (ret < 0) {
dev_err(&phy->dev, "phy poweron failed --> %d\n", ret);
- goto out;
+ goto err_pwr_on;
}
}
++phy->power_count;
mutex_unlock(&phy->mutex);
return 0;
-out:
+err_pwr_on:
mutex_unlock(&phy->mutex);
phy_pm_runtime_put_sync(phy);
+err_pm_sync:
if (phy->pwr)
regulator_disable(phy->pwr);
-
+out:
return ret;
}
EXPORT_SYMBOL_GPL(phy_power_on);
--
1.7.9.5
[toc] | [prev] | [next] | [standalone]
| From | Kishon Vijay Abraham I <kishon@ti.com> |
|---|---|
| Date | 2016-02-10 07:50 +0100 |
| Subject | [PATCH 3/4] phy: twl4030-usb: Relase usb phy on unload |
| Message-ID | <r0wL8-76e-9@gated-at.bofh.it> |
| In reply to | #1330924 |
From: Tony Lindgren <tony@atomide.com> Otherwise rmmod omap2430; rmmod phy-twl4030-usb; modprobe omap2430 will try to use a non-existing phy and oops: Unable to handle kernel paging request at virtual address b6f7c1f0 ... [<c048a284>] (devm_usb_get_phy_by_node) from [<bf0758ac>] (omap2430_musb_init+0x44/0x2b4 [omap2430]) [<bf0758ac>] (omap2430_musb_init [omap2430]) from [<bf055ec0>] (musb_init_controller+0x194/0x878 [musb_hdrc]) Cc: stable@vger.kernel.org Cc: Bin Liu <b-liu@ti.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Kishon Vijay Abraham I <kishon@ti.com> Cc: NeilBrown <neil@brown.name> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> --- drivers/phy/phy-twl4030-usb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c index 4a3fc6e..fe5538f 100644 --- a/drivers/phy/phy-twl4030-usb.c +++ b/drivers/phy/phy-twl4030-usb.c @@ -750,6 +750,7 @@ static int twl4030_usb_remove(struct platform_device *pdev) struct twl4030_usb *twl = platform_get_drvdata(pdev); int val; + usb_remove_phy(&twl->phy); pm_runtime_get_sync(twl->dev); cancel_delayed_work(&twl->id_workaround_work); device_remove_file(twl->dev, &dev_attr_vbus); -- 1.7.9.5
[toc] | [prev] | [next] | [standalone]
| From | Kishon Vijay Abraham I <kishon@ti.com> |
|---|---|
| Date | 2016-02-10 07:50 +0100 |
| Subject | [PATCH 4/4] phy: twl4030-usb: Fix unbalanced pm_runtime_enable on module reload |
| Message-ID | <r0wL8-76e-11@gated-at.bofh.it> |
| In reply to | #1330924 |
From: Tony Lindgren <tony@atomide.com> If we reload phy-twl4030-usb, we get a warning about unbalanced pm_runtime_enable. Let's fix the issue and also fix idling of the device on unload before we attempt to shut it down. If we don't properly idle the PHY before shutting it down on removal, the twl4030 ends up consuming about 62mW of extra power compared to running idle with the module loaded. Cc: stable@vger.kernel.org Cc: Bin Liu <b-liu@ti.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Kishon Vijay Abraham I <kishon@ti.com> Cc: NeilBrown <neil@brown.name> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> --- drivers/phy/phy-twl4030-usb.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c index fe5538f..840f3ea 100644 --- a/drivers/phy/phy-twl4030-usb.c +++ b/drivers/phy/phy-twl4030-usb.c @@ -715,6 +715,7 @@ static int twl4030_usb_probe(struct platform_device *pdev) pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_set_autosuspend_delay(&pdev->dev, 2000); pm_runtime_enable(&pdev->dev); + pm_runtime_get_sync(&pdev->dev); /* Our job is to use irqs and status from the power module * to keep the transceiver disabled when nothing's connected. @@ -758,6 +759,13 @@ static int twl4030_usb_remove(struct platform_device *pdev) /* set transceiver mode to power on defaults */ twl4030_usb_set_mode(twl, -1); + /* idle ulpi before powering off */ + if (cable_present(twl->linkstat)) + pm_runtime_put_noidle(twl->dev); + pm_runtime_mark_last_busy(twl->dev); + pm_runtime_put_sync_suspend(twl->dev); + pm_runtime_disable(twl->dev); + /* autogate 60MHz ULPI clock, * clear dpll clock request for i2c access, * disable 32KHz @@ -772,11 +780,6 @@ static int twl4030_usb_remove(struct platform_device *pdev) /* disable complete OTG block */ twl4030_usb_clear_bits(twl, POWER_CTRL, POWER_CTRL_OTG_ENAB); - if (cable_present(twl->linkstat)) - pm_runtime_put_noidle(twl->dev); - pm_runtime_mark_last_busy(twl->dev); - pm_runtime_put(twl->dev); - return 0; } -- 1.7.9.5
[toc] | [prev] | [next] | [standalone]
| From | Kishon Vijay Abraham I <kishon@ti.com> |
|---|---|
| Date | 2016-02-10 07:50 +0100 |
| Subject | [PATCH 1/4] phy: Restrict phy-hi6220-usb to HiSilicon arm64 |
| Message-ID | <r0wL8-76e-13@gated-at.bofh.it> |
| In reply to | #1330924 |
From: Geert Uytterhoeven <geert@linux-m68k.org> The HiSilicon Hi6220 USB PHY is available in HiSilicon Hi6220 SoCs only. Restrict it to HiSilicon arm64, unless compile-testing. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> --- drivers/phy/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index e7e117d..0124d17 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -224,6 +224,7 @@ config PHY_MT65XX_USB3 config PHY_HI6220_USB tristate "hi6220 USB PHY support" + depends on (ARCH_HISI && ARM64) || COMPILE_TEST select GENERIC_PHY select MFD_SYSCON help -- 1.7.9.5
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-12 05:20 +0100 |
| Message-ID | <r1dn5-1PZ-9@gated-at.bofh.it> |
| In reply to | #1330924 |
On Wed, Feb 10, 2016 at 12:15:04PM +0530, Kishon Vijay Abraham I wrote: > Hi Greg, > > Please find the pull request for this -rc cycle below. It contains a fix in > phy core, twl4030-usb phy driver and a fix in Kconfig. > > Consider merging it to this -rc cycle. Let me know if you want me to change > anything. > > Cheers > Kishon > > The following changes since commit 92e963f50fc74041b5e9e744c330dca48e04f08d: > > Linux 4.5-rc1 (2016-01-24 13:06:47 -0800) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/phy-for-4.5-rc Pulled and pushed out, thanks. greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web