Lines Matching refs:ret

145 	int ret;  in intel_cbphy_iphy_cfg()  local
147 ret = phy_cfg(iphy); in intel_cbphy_iphy_cfg()
148 if (ret) in intel_cbphy_iphy_cfg()
149 return ret; in intel_cbphy_iphy_cfg()
160 int ret; in intel_cbphy_pcie_en_pad_refclk() local
162 ret = intel_cbphy_pcie_refclk_cfg(iphy, true); in intel_cbphy_pcie_en_pad_refclk()
163 if (ret) { in intel_cbphy_pcie_en_pad_refclk()
165 return ret; in intel_cbphy_pcie_en_pad_refclk()
183 int ret; in intel_cbphy_pcie_dis_pad_refclk() local
185 ret = intel_cbphy_pcie_refclk_cfg(iphy, false); in intel_cbphy_pcie_dis_pad_refclk()
186 if (ret) { in intel_cbphy_pcie_dis_pad_refclk()
188 return ret; in intel_cbphy_pcie_dis_pad_refclk()
206 int ret; in intel_cbphy_set_mode() local
231 ret = regmap_write(cbphy->hsiocfg, REG_COMBO_MODE(cbphy->bid), cb_mode); in intel_cbphy_set_mode()
232 if (ret) in intel_cbphy_set_mode()
233 dev_err(dev, "Failed to set ComboPhy mode: %d\n", ret); in intel_cbphy_set_mode()
235 return ret; in intel_cbphy_set_mode()
255 int ret; in intel_cbphy_iphy_power_on() local
258 ret = clk_prepare_enable(cbphy->core_clk); in intel_cbphy_iphy_power_on()
259 if (ret) { in intel_cbphy_iphy_power_on()
261 return ret; in intel_cbphy_iphy_power_on()
264 ret = clk_set_rate(cbphy->core_clk, cbphy->clk_rate); in intel_cbphy_iphy_power_on()
265 if (ret) { in intel_cbphy_iphy_power_on()
273 ret = intel_cbphy_set_mode(cbphy); in intel_cbphy_iphy_power_on()
274 if (ret) in intel_cbphy_iphy_power_on()
278 ret = intel_cbphy_iphy_enable(iphy, true); in intel_cbphy_iphy_power_on()
279 if (ret) { in intel_cbphy_iphy_power_on()
284 ret = reset_control_deassert(iphy->app_rst); in intel_cbphy_iphy_power_on()
285 if (ret) { in intel_cbphy_iphy_power_on()
299 return ret; in intel_cbphy_iphy_power_on()
305 int ret; in intel_cbphy_iphy_power_off() local
307 ret = reset_control_assert(iphy->app_rst); in intel_cbphy_iphy_power_off()
308 if (ret) { in intel_cbphy_iphy_power_off()
311 return ret; in intel_cbphy_iphy_power_off()
314 ret = intel_cbphy_iphy_enable(iphy, false); in intel_cbphy_iphy_power_off()
315 if (ret) { in intel_cbphy_iphy_power_off()
317 return ret; in intel_cbphy_iphy_power_off()
333 int ret; in intel_cbphy_init() local
336 ret = intel_cbphy_iphy_cfg(iphy, intel_cbphy_iphy_power_on); in intel_cbphy_init()
337 if (ret) in intel_cbphy_init()
341 ret = intel_cbphy_iphy_cfg(iphy, intel_cbphy_pcie_en_pad_refclk); in intel_cbphy_init()
342 if (ret) in intel_cbphy_init()
351 return ret; in intel_cbphy_init()
358 int ret; in intel_cbphy_exit() local
363 ret = intel_cbphy_iphy_cfg(iphy, intel_cbphy_pcie_dis_pad_refclk); in intel_cbphy_exit()
364 if (ret) in intel_cbphy_exit()
368 ret = intel_cbphy_iphy_cfg(iphy, intel_cbphy_iphy_power_off); in intel_cbphy_exit()
373 return ret; in intel_cbphy_exit()
381 int val, ret, id; in intel_cbphy_calibrate() local
392 ret = readl_poll_timeout(cr_base + CR_ADDR(PCS_XF_RX_ADAPT_ACK, id), in intel_cbphy_calibrate()
394 if (ret) in intel_cbphy_calibrate()
403 return ret; in intel_cbphy_calibrate()
412 int ret; in intel_cbphy_fwnode_parse() local
417 ret = PTR_ERR(cbphy->core_clk); in intel_cbphy_fwnode_parse()
418 if (ret != -EPROBE_DEFER) in intel_cbphy_fwnode_parse()
419 dev_err(dev, "Get clk failed:%d!\n", ret); in intel_cbphy_fwnode_parse()
420 return ret; in intel_cbphy_fwnode_parse()
425 ret = PTR_ERR(cbphy->core_rst); in intel_cbphy_fwnode_parse()
426 if (ret != -EPROBE_DEFER) in intel_cbphy_fwnode_parse()
427 dev_err(dev, "Get core reset control err: %d!\n", ret); in intel_cbphy_fwnode_parse()
428 return ret; in intel_cbphy_fwnode_parse()
433 ret = PTR_ERR(cbphy->phy_rst); in intel_cbphy_fwnode_parse()
434 if (ret != -EPROBE_DEFER) in intel_cbphy_fwnode_parse()
435 dev_err(dev, "Get PHY reset control err: %d!\n", ret); in intel_cbphy_fwnode_parse()
436 return ret; in intel_cbphy_fwnode_parse()
441 ret = PTR_ERR(cbphy->iphy[0].app_rst); in intel_cbphy_fwnode_parse()
442 if (ret != -EPROBE_DEFER) in intel_cbphy_fwnode_parse()
443 dev_err(dev, "Get phy0 reset control err: %d!\n", ret); in intel_cbphy_fwnode_parse()
444 return ret; in intel_cbphy_fwnode_parse()
449 ret = PTR_ERR(cbphy->iphy[1].app_rst); in intel_cbphy_fwnode_parse()
450 if (ret != -EPROBE_DEFER) in intel_cbphy_fwnode_parse()
451 dev_err(dev, "Get phy1 reset control err: %d!\n", ret); in intel_cbphy_fwnode_parse()
452 return ret; in intel_cbphy_fwnode_parse()
468 ret = fwnode_property_get_reference_args(fwnode, "intel,syscfg", NULL, in intel_cbphy_fwnode_parse()
470 if (ret < 0) in intel_cbphy_fwnode_parse()
471 return ret; in intel_cbphy_fwnode_parse()
477 ret = fwnode_property_get_reference_args(fwnode, "intel,hsio", NULL, 1, in intel_cbphy_fwnode_parse()
479 if (ret < 0) in intel_cbphy_fwnode_parse()
480 return ret; in intel_cbphy_fwnode_parse()
486 ret = fwnode_property_read_u32_array(fwnode, "intel,phy-mode", &val, 1); in intel_cbphy_fwnode_parse()
487 if (ret) in intel_cbphy_fwnode_parse()
488 return ret; in intel_cbphy_fwnode_parse()
589 int ret; in intel_cbphy_probe() local
598 ret = intel_cbphy_fwnode_parse(cbphy); in intel_cbphy_probe()
599 if (ret) in intel_cbphy_probe()
600 return ret; in intel_cbphy_probe()