aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-04-23 15:05:40 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-23 15:50:38 -0400
commitee5d5499edb94cd03738a52a7e234b139da8fd72 (patch)
tree6c6fe301f894625e86afb19ed283d3e2af39c77d /include
parent4623245c769662e7cad80e1f9b39dadfbc2ad06d (diff)
usb: phy: tegra: don't call into tegra-ehci directly
Both phy-tegra-usb.c and ehci-tegra.c export symbols used by the other one, which does not work if one of them or both are loadable modules, resulting in an error like: drivers/built-in.o: In function `utmi_phy_clk_disable': drivers/usb/phy/phy-tegra-usb.c:302: undefined reference to `tegra_ehci_set_phcd' drivers/built-in.o: In function `utmi_phy_clk_enable': drivers/usb/phy/phy-tegra-usb.c:324: undefined reference to `tegra_ehci_set_phcd' drivers/built-in.o: In function `utmi_phy_power_on': drivers/usb/phy/phy-tegra-usb.c:447: undefined reference to `tegra_ehci_set_pts' This turns the interface into a one-way dependency by letting the tegra ehci driver pass two function pointers for callbacks that need to be called by the phy driver. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Venu Byravarasu <vbyravarasu@nvidia.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Felipe Balbi <balbi@ti.com> Cc: Stephen Warren <swarren@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/tegra_usb_phy.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h
index 9ebebe906925..1b7519a8c0bf 100644
--- a/include/linux/usb/tegra_usb_phy.h
+++ b/include/linux/usb/tegra_usb_phy.h
@@ -61,10 +61,14 @@ struct tegra_usb_phy {
61 struct device *dev; 61 struct device *dev;
62 bool is_legacy_phy; 62 bool is_legacy_phy;
63 bool is_ulpi_phy; 63 bool is_ulpi_phy;
64 void (*set_pts)(struct usb_phy *x, u8 pts_val);
65 void (*set_phcd)(struct usb_phy *x, bool enable);
64}; 66};
65 67
66struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance, 68struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
67 void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode); 69 void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode,
70 void (*set_pts)(struct usb_phy *x, u8 pts_val),
71 void (*set_phcd)(struct usb_phy *x, bool enable));
68 72
69void tegra_usb_phy_preresume(struct usb_phy *phy); 73void tegra_usb_phy_preresume(struct usb_phy *phy);
70 74
@@ -75,8 +79,4 @@ void tegra_ehci_phy_restore_start(struct usb_phy *phy,
75 79
76void tegra_ehci_phy_restore_end(struct usb_phy *phy); 80void tegra_ehci_phy_restore_end(struct usb_phy *phy);
77 81
78void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val);
79
80void tegra_ehci_set_phcd(struct usb_phy *x, bool enable);
81
82#endif /* __TEGRA_USB_PHY_H */ 82#endif /* __TEGRA_USB_PHY_H */