Lines Matching refs:lpc
33 struct lpc18xx_usb_otg_phy *lpc = phy_get_drvdata(phy); in lpc18xx_usb_otg_phy_init() local
37 ret = clk_set_rate(lpc->clk, 480000000); in lpc18xx_usb_otg_phy_init()
41 return clk_prepare(lpc->clk); in lpc18xx_usb_otg_phy_init()
46 struct lpc18xx_usb_otg_phy *lpc = phy_get_drvdata(phy); in lpc18xx_usb_otg_phy_exit() local
48 clk_unprepare(lpc->clk); in lpc18xx_usb_otg_phy_exit()
55 struct lpc18xx_usb_otg_phy *lpc = phy_get_drvdata(phy); in lpc18xx_usb_otg_phy_power_on() local
58 ret = clk_enable(lpc->clk); in lpc18xx_usb_otg_phy_power_on()
63 return regmap_update_bits(lpc->reg, LPC18XX_CREG_CREG0, in lpc18xx_usb_otg_phy_power_on()
69 struct lpc18xx_usb_otg_phy *lpc = phy_get_drvdata(phy); in lpc18xx_usb_otg_phy_power_off() local
72 ret = regmap_update_bits(lpc->reg, LPC18XX_CREG_CREG0, in lpc18xx_usb_otg_phy_power_off()
78 clk_disable(lpc->clk); in lpc18xx_usb_otg_phy_power_off()
94 struct lpc18xx_usb_otg_phy *lpc; in lpc18xx_usb_otg_phy_probe() local
96 lpc = devm_kzalloc(&pdev->dev, sizeof(*lpc), GFP_KERNEL); in lpc18xx_usb_otg_phy_probe()
97 if (!lpc) in lpc18xx_usb_otg_phy_probe()
100 lpc->reg = syscon_node_to_regmap(pdev->dev.of_node->parent); in lpc18xx_usb_otg_phy_probe()
101 if (IS_ERR(lpc->reg)) { in lpc18xx_usb_otg_phy_probe()
103 return PTR_ERR(lpc->reg); in lpc18xx_usb_otg_phy_probe()
106 lpc->clk = devm_clk_get(&pdev->dev, NULL); in lpc18xx_usb_otg_phy_probe()
107 if (IS_ERR(lpc->clk)) { in lpc18xx_usb_otg_phy_probe()
109 return PTR_ERR(lpc->clk); in lpc18xx_usb_otg_phy_probe()
112 lpc->phy = devm_phy_create(&pdev->dev, NULL, &lpc18xx_usb_otg_phy_ops); in lpc18xx_usb_otg_phy_probe()
113 if (IS_ERR(lpc->phy)) { in lpc18xx_usb_otg_phy_probe()
115 return PTR_ERR(lpc->phy); in lpc18xx_usb_otg_phy_probe()
118 phy_set_drvdata(lpc->phy, lpc); in lpc18xx_usb_otg_phy_probe()