Lines Matching refs:phy_dev

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