Lines Matching +full:c +full:- +full:phy
1 // SPDX-License-Identifier: GPL-1.0+
3 * Renesas USB driver R-Car Gen. 2 initialization and power control
5 * Copyright (C) 2014 Ulrich Hecht
6 * Copyright (C) 2019 Renesas Electronics Corporation
9 #include <linux/phy/phy.h>
18 struct phy *phy = phy_get(&pdev->dev, "usb"); in usbhs_rcar2_hardware_init() local
20 if (IS_ERR(phy)) in usbhs_rcar2_hardware_init()
21 return PTR_ERR(phy); in usbhs_rcar2_hardware_init()
23 priv->phy = phy; in usbhs_rcar2_hardware_init()
27 return -ENXIO; in usbhs_rcar2_hardware_init()
34 if (priv->phy) { in usbhs_rcar2_hardware_exit()
35 phy_put(&pdev->dev, priv->phy); in usbhs_rcar2_hardware_exit()
36 priv->phy = NULL; in usbhs_rcar2_hardware_exit()
46 int retval = -ENODEV; in usbhs_rcar2_power_ctrl()
48 if (priv->phy) { in usbhs_rcar2_power_ctrl()
50 retval = phy_init(priv->phy); in usbhs_rcar2_power_ctrl()
53 retval = phy_power_on(priv->phy); in usbhs_rcar2_power_ctrl()
55 phy_power_off(priv->phy); in usbhs_rcar2_power_ctrl()
56 phy_exit(priv->phy); in usbhs_rcar2_power_ctrl()