This source file includes following definitions.
- ulpi_phy_create
- ulpi_phy_destroy
1
2 #include <linux/phy/phy.h>
3
4
5
6
7
8 static inline struct phy
9 *ulpi_phy_create(struct ulpi *ulpi, const struct phy_ops *ops)
10 {
11 struct phy *phy;
12 int ret;
13
14 phy = phy_create(&ulpi->dev, NULL, ops);
15 if (IS_ERR(phy))
16 return phy;
17
18 ret = phy_create_lookup(phy, "usb2-phy", dev_name(ulpi->dev.parent));
19 if (ret) {
20 phy_destroy(phy);
21 return ERR_PTR(ret);
22 }
23
24 return phy;
25 }
26
27
28 static inline void ulpi_phy_destroy(struct ulpi *ulpi, struct phy *phy)
29 {
30 phy_remove_lookup(phy, "usb2-phy", dev_name(ulpi->dev.parent));
31 phy_destroy(phy);
32 }