summaryrefslogtreecommitdiff
path: root/drivers/phy/tegra/xusb.c
diff options
context:
space:
mode:
authorNagarjuna Kristam <nkristam@nvidia.com>2019-10-18 12:38:08 +0300
committerKishon Vijay Abraham I <kishon@ti.com>2019-10-23 10:50:36 +0300
commit90767cdfea89c3ac7012035d66633b9ba839091a (patch)
treed70d16dd3ab965f9c217badf870d6c456fa36d26 /drivers/phy/tegra/xusb.c
parenta5be28c3656af71f1c9d75381f7b86d5056da9f3 (diff)
downloadlinux-90767cdfea89c3ac7012035d66633b9ba839091a.tar.xz
phy: tegra: xusb: Add vbus override support on Tegra210
Tegra XUSB device control driver needs to control vbus override during its operations, add API for the support. Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy/tegra/xusb.c')
-rw-r--r--drivers/phy/tegra/xusb.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index b4b217e2ad49..bf4b00853438 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -1121,6 +1121,28 @@ int tegra_xusb_padctl_usb3_set_lfps_detect(struct tegra_xusb_padctl *padctl,
}
EXPORT_SYMBOL_GPL(tegra_xusb_padctl_usb3_set_lfps_detect);
+int tegra_xusb_padctl_set_vbus_override(struct tegra_xusb_padctl *padctl,
+ bool val)
+{
+ if (padctl->soc->ops->vbus_override)
+ return padctl->soc->ops->vbus_override(padctl, val);
+
+ return -ENOTSUPP;
+}
+EXPORT_SYMBOL_GPL(tegra_xusb_padctl_set_vbus_override);
+
+int tegra_phy_xusb_utmi_port_reset(struct phy *phy)
+{
+ struct tegra_xusb_lane *lane = phy_get_drvdata(phy);
+ struct tegra_xusb_padctl *padctl = lane->pad->padctl;
+
+ if (padctl->soc->ops->utmi_port_reset)
+ return padctl->soc->ops->utmi_port_reset(phy);
+
+ return -ENOTSUPP;
+}
+EXPORT_SYMBOL_GPL(tegra_phy_xusb_utmi_port_reset);
+
MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>");
MODULE_DESCRIPTION("Tegra XUSB Pad Controller driver");
MODULE_LICENSE("GPL v2");