Lines Matching refs:phy_dev
42 static int stih407_usb2_pico_ctrl(struct stih407_usb2_picophy *phy_dev)
44 reset_control_deassert(phy_dev->rstc);
46 return regmap_update_bits(phy_dev->regmap, phy_dev->ctrl,
54 struct stih407_usb2_picophy *phy_dev = phy_get_drvdata(phy);
56 stih407_usb2_pico_ctrl(phy_dev);
58 ret = regmap_update_bits(phy_dev->regmap,
59 phy_dev->param,
65 return reset_control_deassert(phy_dev->rstport);
70 struct stih407_usb2_picophy *phy_dev = phy_get_drvdata(phy);
79 return reset_control_assert(phy_dev->rstport);
90 struct stih407_usb2_picophy *phy_dev;
97 phy_dev = devm_kzalloc(dev, sizeof(*phy_dev), GFP_KERNEL);
98 if (!phy_dev)
101 phy_dev->dev = dev;
102 dev_set_drvdata(dev, phy_dev);
104 phy_dev->rstc = devm_reset_control_get_shared(dev, "global");
105 if (IS_ERR(phy_dev->rstc)) {
107 return PTR_ERR(phy_dev->rstc);
110 phy_dev->rstport = devm_reset_control_get_exclusive(dev, "port");
111 if (IS_ERR(phy_dev->rstport)) {
113 return PTR_ERR(phy_dev->rstport);
117 reset_control_assert(phy_dev->rstport);
119 phy_dev->regmap = syscon_regmap_lookup_by_phandle(np, "st,syscfg");
120 if (IS_ERR(phy_dev->regmap)) {
122 return PTR_ERR(phy_dev->regmap);
126 &phy_dev->param);
133 &phy_dev->ctrl);
145 phy_dev->phy = phy;
146 phy_set_drvdata(phy, phy_dev);