summaryrefslogtreecommitdiff
path: root/drivers/phy
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2014-05-08 07:27:55 +0200
committerMarek Szyprowski <m.szyprowski@samsung.com>2014-05-15 07:29:24 +0200
commit08d09480ddf146f5688d48a8c397d78cb05f9747 (patch)
treef513a73415b9b20ee9cf4e441976c1f12de5f1d8 /drivers/phy
parent0aa74d95d2bc85e1ae016e06c4c967ecc0cb2bab (diff)
downloadlinux-3.10-08d09480ddf146f5688d48a8c397d78cb05f9747.tar.gz
linux-3.10-08d09480ddf146f5688d48a8c397d78cb05f9747.tar.bz2
linux-3.10-08d09480ddf146f5688d48a8c397d78cb05f9747.zip
Revert "phy: exynos-usb: Remove ref counting for additional reset for Exynos4212"
This reverts commit f600e05157a6d3d38f87260f5caa88918cac129e. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Change-Id: Id87eb3479a353d34f58092973e2896bdacaf9c2a
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/phy-exynos4212-usb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/phy/phy-exynos4212-usb.c b/drivers/phy/phy-exynos4212-usb.c
index a9fa15d9153..b7de33f6324 100644
--- a/drivers/phy/phy-exynos4212-usb.c
+++ b/drivers/phy/phy-exynos4212-usb.c
@@ -262,6 +262,9 @@ static int exynos4212_power_on(struct uphy_instance *inst)
if (inst->cfg->id == EXYNOS4212_HSIC0) {
struct uphy_instance *device =
&drv->uphy_instances[EXYNOS4212_DEVICE];
+ device->ref_cnt++;
+ if (device->ref_cnt > 1)
+ return 0;
exynos4212_phy_pwr(device, 1);
exynos4212_isol(device, 0);
}
@@ -291,6 +294,9 @@ static int exynos4212_power_off(struct uphy_instance *inst)
if (inst->cfg->id == EXYNOS4212_HSIC0) {
struct uphy_instance *device =
&drv->uphy_instances[EXYNOS4212_DEVICE];
+ device->ref_cnt--;
+ if (device->ref_cnt > 0)
+ return 0;
exynos4212_phy_pwr(device, 0);
exynos4212_isol(device, 1);
}