summaryrefslogtreecommitdiff
path: root/include/linux/usb
diff options
context:
space:
mode:
authorRakesh Bodla <rbodla@nvidia.com>2011-02-22 19:16:33 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 01:13:28 -0700
commit6a8fcbb33c4d42da2ac7f6b2a090cef08200af5e (patch)
tree5b6f47184ab9f193f0b7158b718ea6e1d120a90f /include/linux/usb
parentc57023a8bd137a0df4ae659097542dbb4caab2bd (diff)
tegra: usb: phy: Regulator APIs for USB power rails
Added regulator APIs to control the USB power rails. Also, added support to turn on/off vbus appropriately. Bug 770041 Original-Change-Id: I68174330c3ad17da82aecae27298ce697e8bba34 Reviewed-on: http://git-master/r/20025 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R7ece5dd8677f0ed51025899c1d6a1ce872a75f3c
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/tegra_usb_phy.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h
index 6a222773f8cd..d5c83e4e0acd 100644
--- a/include/linux/usb/tegra_usb_phy.h
+++ b/include/linux/usb/tegra_usb_phy.h
@@ -17,6 +17,7 @@
#define __TEGRA_USB_PHY_H
#include <linux/clk.h>
+#include <linux/regulator/consumer.h>
#include <linux/usb/otg.h>
struct tegra_utmip_config {
@@ -70,6 +71,12 @@ enum tegra_usb_phy_mode {
TEGRA_USB_PHY_MODE_HOST,
};
+struct usb_phy_plat_data {
+ int instance;
+ int vbus_irq;
+ int vbus_gpio;
+};
+
struct tegra_xtal_freq;
struct tegra_usb_phy {
@@ -82,6 +89,8 @@ struct tegra_usb_phy {
struct clk *pad_clk;
enum tegra_usb_phy_mode mode;
void *config;
+ struct regulator *reg_vdd;
+ bool regulator_on;
struct usb_phy *ulpi;
struct usb_phy u_phy;
struct device *dev;
@@ -112,4 +121,6 @@ int tegra_usb_phy_bus_idle(struct tegra_usb_phy *phy);
bool tegra_usb_phy_is_device_connected(struct tegra_usb_phy *phy);
+int __init tegra_usb_phy_init(struct usb_phy_plat_data *pdata, int size);
+
#endif /* __TEGRA_USB_PHY_H */