Lines Matching refs:am_phy

25 	struct am335x_phy *am_phy = dev_get_drvdata(phy->dev);  in am335x_init()  local
27 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, true); in am335x_init()
33 struct am335x_phy *am_phy = dev_get_drvdata(phy->dev); in am335x_shutdown() local
35 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, false); in am335x_shutdown()
40 struct am335x_phy *am_phy; in am335x_phy_probe() local
44 am_phy = devm_kzalloc(dev, sizeof(*am_phy), GFP_KERNEL); in am335x_phy_probe()
45 if (!am_phy) in am335x_phy_probe()
48 am_phy->phy_ctrl = am335x_get_phy_control(dev); in am335x_phy_probe()
49 if (!am_phy->phy_ctrl) in am335x_phy_probe()
52 am_phy->id = of_alias_get_id(pdev->dev.of_node, "phy"); in am335x_phy_probe()
53 if (am_phy->id < 0) { in am335x_phy_probe()
54 dev_err(&pdev->dev, "Missing PHY id: %d\n", am_phy->id); in am335x_phy_probe()
55 return am_phy->id; in am335x_phy_probe()
58 am_phy->dr_mode = of_usb_get_dr_mode_by_phy(pdev->dev.of_node, -1); in am335x_phy_probe()
60 ret = usb_phy_gen_create_phy(dev, &am_phy->usb_phy_gen); in am335x_phy_probe()
64 am_phy->usb_phy_gen.phy.init = am335x_init; in am335x_phy_probe()
65 am_phy->usb_phy_gen.phy.shutdown = am335x_shutdown; in am335x_phy_probe()
67 platform_set_drvdata(pdev, am_phy); in am335x_phy_probe()
80 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, false); in am335x_phy_probe()
82 return usb_add_phy_dev(&am_phy->usb_phy_gen.phy); in am335x_phy_probe()
87 struct am335x_phy *am_phy = platform_get_drvdata(pdev); in am335x_phy_remove() local
89 usb_remove_phy(&am_phy->usb_phy_gen.phy); in am335x_phy_remove()
95 struct am335x_phy *am_phy = dev_get_drvdata(dev); in am335x_phy_suspend() local
106 phy_ctrl_wkup(am_phy->phy_ctrl, am_phy->id, true); in am335x_phy_suspend()
108 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, false); in am335x_phy_suspend()
115 struct am335x_phy *am_phy = dev_get_drvdata(dev); in am335x_phy_resume() local
117 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, true); in am335x_phy_resume()
120 phy_ctrl_wkup(am_phy->phy_ctrl, am_phy->id, false); in am335x_phy_resume()