summaryrefslogtreecommitdiffstats
path: root/drivers/phy/phy-stih41x-usb.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-10 13:47:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-10 13:47:50 +0200
commit2aebe3f3b20724e09ec76b196e16404d1ea573d9 (patch)
treeef667cb786a58d3bb2639ad5c488e5bac501defa /drivers/phy/phy-stih41x-usb.c
parentMerge tag 'usb-for-v4.1-part2' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
parentMAINTAINERS: Add phy-miphy28lp.c and phy-miphy365x.c to ARCH/STI architecture (diff)
downloadlinux-2aebe3f3b20724e09ec76b196e16404d1ea573d9.tar.xz
linux-2aebe3f3b20724e09ec76b196e16404d1ea573d9.zip
Merge tag 'for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next
Kishon writes: New Features ============ *) Add driver for USB PHYs on sun9i *) Add driver for USB PHY on dm816x *) Modified exynos5-usbdrd driver to add support for Exynos5433 SoC Fixes ===== *) Fix power_on/power_off failure paths in some drivers *) Make miphy365x use generic PHY type constants *) Fix build errors due to missing export symbols in qcom-ufs driver *) Make all the functions return proper error values Cleanups ======== *) use PTR_ERR_OR_ZERO to simplify code *) use devm_kcalloc instead of devm_kzalloc with multiply *) remove un-necessary ifdef CONFIG_OF
Diffstat (limited to 'drivers/phy/phy-stih41x-usb.c')
-rw-r--r--drivers/phy/phy-stih41x-usb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/phy/phy-stih41x-usb.c b/drivers/phy/phy-stih41x-usb.c
index a603801293ff..c093b472b57d 100644
--- a/drivers/phy/phy-stih41x-usb.c
+++ b/drivers/phy/phy-stih41x-usb.c
@@ -87,8 +87,12 @@ static int stih41x_usb_phy_power_on(struct phy *phy)
return ret;
}
- return regmap_update_bits(phy_dev->regmap, phy_dev->cfg->syscfg,
- phy_dev->cfg->oscok, phy_dev->cfg->oscok);
+ ret = regmap_update_bits(phy_dev->regmap, phy_dev->cfg->syscfg,
+ phy_dev->cfg->oscok, phy_dev->cfg->oscok);
+ if (ret)
+ clk_disable_unprepare(phy_dev->clk);
+
+ return ret;
}
static int stih41x_usb_phy_power_off(struct phy *phy)