Lines Matching refs:phy

266 static struct udevice *rockchip_usb2phy_check_vbus(struct phy *phy)  in rockchip_usb2phy_check_vbus()  argument
268 struct udevice *parent = phy->dev->parent; in rockchip_usb2phy_check_vbus()
275 if (phy->id == USB2PHY_PORT_HOST) { in rockchip_usb2phy_check_vbus()
277 } else if (phy->id == USB2PHY_PORT_OTG) { in rockchip_usb2phy_check_vbus()
289 static int rockchip_usb2phy_init(struct phy *phy) in rockchip_usb2phy_init() argument
291 struct udevice *parent = phy->dev->parent; in rockchip_usb2phy_init()
295 if (phy->id == USB2PHY_PORT_OTG) { in rockchip_usb2phy_init()
297 } else if (phy->id == USB2PHY_PORT_HOST) { in rockchip_usb2phy_init()
300 dev_err(phy->dev, "phy id %lu not support", phy->id); in rockchip_usb2phy_init()
312 static int rockchip_usb2phy_exit(struct phy *phy) in rockchip_usb2phy_exit() argument
314 struct udevice *parent = phy->dev->parent; in rockchip_usb2phy_exit()
318 if (phy->id == USB2PHY_PORT_OTG) { in rockchip_usb2phy_exit()
320 } else if (phy->id == USB2PHY_PORT_HOST) { in rockchip_usb2phy_exit()
323 dev_err(phy->dev, "phy id %lu not support", phy->id); in rockchip_usb2phy_exit()
332 static int rockchip_usb2phy_power_on(struct phy *phy) in rockchip_usb2phy_power_on() argument
337 vbus = rockchip_usb2phy_check_vbus(phy); in rockchip_usb2phy_power_on()
349 static int rockchip_usb2phy_power_off(struct phy *phy) in rockchip_usb2phy_power_off() argument
354 vbus = rockchip_usb2phy_check_vbus(phy); in rockchip_usb2phy_power_off()
366 static int rockchip_usb2phy_of_xlate(struct phy *phy, in rockchip_usb2phy_of_xlate() argument
369 const char *dev_name = phy->dev->name; in rockchip_usb2phy_of_xlate()
370 struct udevice *parent = phy->dev->parent; in rockchip_usb2phy_of_xlate()
374 phy->id = USB2PHY_PORT_HOST; in rockchip_usb2phy_of_xlate()
375 device_get_supply_regulator(phy->dev, "phy-supply", in rockchip_usb2phy_of_xlate()
378 phy->id = USB2PHY_PORT_OTG; in rockchip_usb2phy_of_xlate()
379 device_get_supply_regulator(phy->dev, "phy-supply", in rockchip_usb2phy_of_xlate()