1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/phy/phy.h>
5 * Helper that registers PHY for a ULPI device and adds a lookup for binding it
6 * and it's controller, which is always the parent.
8 static inline struct phy
9 *ulpi_phy_create(struct ulpi *ulpi, const struct phy_ops *ops)
14 phy = phy_create(&ulpi->dev, NULL, ops);
18 ret = phy_create_lookup(phy, "usb2-phy", dev_name(ulpi->dev.parent));
27 /* Remove a PHY that was created with ulpi_phy_create() and it's lookup. */
28 static inline void ulpi_phy_destroy(struct ulpi *ulpi, struct phy *phy)
30 phy_remove_lookup(phy, "usb2-phy", dev_name(ulpi->dev.parent));