summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMayank Rana <mrana@codeaurora.org>2015-06-23 19:52:51 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:06:10 -0700
commitcb69b6cb90b53c8ddac492e87a6d54a1f3f4327b (patch)
treebbcf3831bbda3431e8d532559ec0391facd1ee8d /include
parent0cfa0c949f94d01544a19bf8cfc336d0666a7b5d (diff)
USB: phy: Add support to invoke DP and DM sourcing and pulsing
This change adds support for sourcing and pulsig with DP/DM using QUSB PHY. This change uses POWER_SUPPLY_PROP_DP_DM power supply property with different values to achieve the same. This change is a cherry-pick of msm-3.18 commit 55b93e2506d5399b1b0ee4a1b173168fb8026548 ("USB: Add support to invoke DP and DM sourcing and pulsing") with only the change from include/linux/usb/phy.h Signed-off-by: Mayank Rana <mrana@codeaurora.org> Signed-off-by: Jack Pham <jackp@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/phy.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index d25125402fda..43965e530ee4 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -126,6 +126,9 @@ struct usb_phy {
/* reset the PHY clocks */
int (*reset)(struct usb_phy *x);
+
+ /* update DP/DM state */
+ int (*change_dpdm)(struct usb_phy *x, int dpdm);
};
/**
@@ -286,6 +289,14 @@ usb_phy_set_power(struct usb_phy *x, unsigned mA)
return 0;
}
+static inline int
+usb_phy_change_dpdm(struct usb_phy *x, int dpdm)
+{
+ if (x && x->change_dpdm)
+ return x->change_dpdm(x, dpdm);
+ return 0;
+}
+
/* Context: can sleep */
static inline int
usb_phy_set_suspend(struct usb_phy *x, int suspend)