Lines Matching refs:phy_dev
46 static int stih407_usb2_pico_ctrl(struct stih407_usb2_picophy *phy_dev) in stih407_usb2_pico_ctrl() argument
48 reset_control_deassert(phy_dev->rstc); in stih407_usb2_pico_ctrl()
50 return regmap_update_bits(phy_dev->regmap, phy_dev->ctrl, in stih407_usb2_pico_ctrl()
58 struct stih407_usb2_picophy *phy_dev = phy_get_drvdata(phy); in stih407_usb2_init_port() local
60 stih407_usb2_pico_ctrl(phy_dev); in stih407_usb2_init_port()
62 ret = regmap_update_bits(phy_dev->regmap, in stih407_usb2_init_port()
63 phy_dev->param, in stih407_usb2_init_port()
69 return reset_control_deassert(phy_dev->rstport); in stih407_usb2_init_port()
74 struct stih407_usb2_picophy *phy_dev = phy_get_drvdata(phy); in stih407_usb2_exit_port() local
83 return reset_control_assert(phy_dev->rstport); in stih407_usb2_exit_port()
94 struct stih407_usb2_picophy *phy_dev; in stih407_usb2_picophy_probe() local
101 phy_dev = devm_kzalloc(dev, sizeof(*phy_dev), GFP_KERNEL); in stih407_usb2_picophy_probe()
102 if (!phy_dev) in stih407_usb2_picophy_probe()
105 phy_dev->dev = dev; in stih407_usb2_picophy_probe()
106 dev_set_drvdata(dev, phy_dev); in stih407_usb2_picophy_probe()
108 phy_dev->rstc = devm_reset_control_get(dev, "global"); in stih407_usb2_picophy_probe()
109 if (IS_ERR(phy_dev->rstc)) { in stih407_usb2_picophy_probe()
111 return PTR_ERR(phy_dev->rstc); in stih407_usb2_picophy_probe()
114 phy_dev->rstport = devm_reset_control_get(dev, "port"); in stih407_usb2_picophy_probe()
115 if (IS_ERR(phy_dev->rstport)) { in stih407_usb2_picophy_probe()
117 return PTR_ERR(phy_dev->rstport); in stih407_usb2_picophy_probe()
121 reset_control_assert(phy_dev->rstport); in stih407_usb2_picophy_probe()
123 phy_dev->regmap = syscon_regmap_lookup_by_phandle(np, "st,syscfg"); in stih407_usb2_picophy_probe()
124 if (IS_ERR(phy_dev->regmap)) { in stih407_usb2_picophy_probe()
126 return PTR_ERR(phy_dev->regmap); in stih407_usb2_picophy_probe()
130 &phy_dev->param); in stih407_usb2_picophy_probe()
137 &phy_dev->ctrl); in stih407_usb2_picophy_probe()
149 phy_dev->phy = phy; in stih407_usb2_picophy_probe()
150 phy_set_drvdata(phy, phy_dev); in stih407_usb2_picophy_probe()