summaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy/phy-samsung-usb3.c
diff options
context:
space:
mode:
authorTomasz Figa <t.figa@samsung.com>2013-05-16 11:57:09 +0200
committerFelipe Balbi <balbi@ti.com>2013-05-28 20:06:49 +0300
commit3f339074edfa0d531edaa6bd095f718e58b50a7d (patch)
treeec7554d94bdff7ded19e0c269425a19b055c43e4 /drivers/usb/phy/phy-samsung-usb3.c
parent0aa823a2ca02cd21c587713e8195a2ffb8bd7872 (diff)
downloadblackbird-op-linux-3f339074edfa0d531edaa6bd095f718e58b50a7d.tar.gz
blackbird-op-linux-3f339074edfa0d531edaa6bd095f718e58b50a7d.zip
usb: phy: samsung: Pass set_isolation callback through driver data
This patch extends driver data structure with set_isolation callback, which allows to remove the need for checking for SoC type in a switch statement. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy/phy-samsung-usb3.c')
-rw-r--r--drivers/usb/phy/phy-samsung-usb3.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/phy/phy-samsung-usb3.c b/drivers/usb/phy/phy-samsung-usb3.c
index ec44b35fb24a..3a30a5edde98 100644
--- a/drivers/usb/phy/phy-samsung-usb3.c
+++ b/drivers/usb/phy/phy-samsung-usb3.c
@@ -184,7 +184,8 @@ static int samsung_usb3phy_init(struct usb_phy *phy)
samsung_usbphy_set_type(&sphy->phy, USB_PHY_TYPE_DEVICE);
/* Disable phy isolation */
- samsung_usbphy_set_isolation(sphy, false);
+ if (sphy->drv_data->set_isolation)
+ sphy->drv_data->set_isolation(sphy, false);
/* Initialize usb phy registers */
samsung_exynos5_usb3phy_enable(sphy);
@@ -221,7 +222,8 @@ static void samsung_usb3phy_shutdown(struct usb_phy *phy)
samsung_exynos5_usb3phy_disable(sphy);
/* Enable phy isolation */
- samsung_usbphy_set_isolation(sphy, true);
+ if (sphy->drv_data->set_isolation)
+ sphy->drv_data->set_isolation(sphy, true);
spin_unlock_irqrestore(&sphy->lock, flags);
@@ -304,6 +306,7 @@ static struct samsung_usbphy_drvdata usb3phy_exynos5 = {
.cpu_type = TYPE_EXYNOS5250,
.devphy_en_mask = EXYNOS_USBPHY_ENABLE,
.rate_to_clksel = samsung_usbphy_rate_to_clksel_4x12,
+ .set_isolation = samsung_usbphy_set_isolation_4210,
};
#ifdef CONFIG_OF
OpenPOWER on IntegriCloud