Lines Matching full:lpc
29 struct lpc18xx_usb_otg_phy *lpc = phy_get_drvdata(phy); in lpc18xx_usb_otg_phy_init() local
33 ret = clk_set_rate(lpc->clk, 480000000); in lpc18xx_usb_otg_phy_init()
37 return clk_prepare(lpc->clk); in lpc18xx_usb_otg_phy_init()
42 struct lpc18xx_usb_otg_phy *lpc = phy_get_drvdata(phy); in lpc18xx_usb_otg_phy_exit() local
44 clk_unprepare(lpc->clk); in lpc18xx_usb_otg_phy_exit()
51 struct lpc18xx_usb_otg_phy *lpc = phy_get_drvdata(phy); in lpc18xx_usb_otg_phy_power_on() local
54 ret = clk_enable(lpc->clk); in lpc18xx_usb_otg_phy_power_on()
59 ret = regmap_update_bits(lpc->reg, LPC18XX_CREG_CREG0, in lpc18xx_usb_otg_phy_power_on()
62 clk_disable(lpc->clk); in lpc18xx_usb_otg_phy_power_on()
71 struct lpc18xx_usb_otg_phy *lpc = phy_get_drvdata(phy); in lpc18xx_usb_otg_phy_power_off() local
74 ret = regmap_update_bits(lpc->reg, LPC18XX_CREG_CREG0, in lpc18xx_usb_otg_phy_power_off()
80 clk_disable(lpc->clk); in lpc18xx_usb_otg_phy_power_off()
96 struct lpc18xx_usb_otg_phy *lpc; in lpc18xx_usb_otg_phy_probe() local
98 lpc = devm_kzalloc(&pdev->dev, sizeof(*lpc), GFP_KERNEL); in lpc18xx_usb_otg_phy_probe()
99 if (!lpc) in lpc18xx_usb_otg_phy_probe()
102 lpc->reg = syscon_node_to_regmap(pdev->dev.of_node->parent); in lpc18xx_usb_otg_phy_probe()
103 if (IS_ERR(lpc->reg)) { in lpc18xx_usb_otg_phy_probe()
105 return PTR_ERR(lpc->reg); in lpc18xx_usb_otg_phy_probe()
108 lpc->clk = devm_clk_get(&pdev->dev, NULL); in lpc18xx_usb_otg_phy_probe()
109 if (IS_ERR(lpc->clk)) { in lpc18xx_usb_otg_phy_probe()
111 return PTR_ERR(lpc->clk); in lpc18xx_usb_otg_phy_probe()
114 lpc->phy = devm_phy_create(&pdev->dev, NULL, &lpc18xx_usb_otg_phy_ops); in lpc18xx_usb_otg_phy_probe()
115 if (IS_ERR(lpc->phy)) { in lpc18xx_usb_otg_phy_probe()
117 return PTR_ERR(lpc->phy); in lpc18xx_usb_otg_phy_probe()
120 phy_set_drvdata(lpc->phy, lpc); in lpc18xx_usb_otg_phy_probe()