summaryrefslogtreecommitdiff
path: root/drivers/phy
diff options
context:
space:
mode:
authorManu Gautam <mgautam@codeaurora.org>2018-01-16 16:27:09 +0530
committerKishon Vijay Abraham I <kishon@ti.com>2018-03-08 13:56:17 +0530
commit3b3cd24ae61b3bbe9d3cecaff33e7cb3250ce47a (patch)
treeb321514a374f357ec67bd3c2f80f5e105ef7c57e /drivers/phy
parentefb05a50c956b4ccd09c8401eed53bf3894d4026 (diff)
phy: Add USB speed related PHY modes
Add following USB speed related PHY modes: LS (Low Speed), FS (Full Speed), HS (High Speed), SS (Super Speed) Speed related information is required by some QCOM PHY drivers to program PHY monitor resume/remote-wakeup events in suspended state. Speed is needed in order to set correct polarity of wakeup events for detection. E.g. QUSB2 PHY monitors DP/DM line state depending on whether speed is LS or FS/HS to detect resume. Similarly QMP USB3 PHY in SS mode should monitor RX terminations attach/detach and LFPS events depending on SSPHY is active or not. Signed-off-by: Manu Gautam <mgautam@codeaurora.org> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/phy-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 8f6e8e28996d..09ac8afb97ac 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -351,6 +351,8 @@ int phy_set_mode(struct phy *phy, enum phy_mode mode)
mutex_lock(&phy->mutex);
ret = phy->ops->set_mode(phy, mode);
+ if (!ret)
+ phy->attrs.mode = mode;
mutex_unlock(&phy->mutex);
return ret;