[PATCH v6] phy: qcom-qmp-ufs: provide symbol clocks

Johan Hovold johan at kernel.org
Sat Oct 29 02:24:58 PDT 2022


On Sat, Oct 29, 2022 at 11:02:56AM +0200, Johan Hovold wrote:
> On Fri, Oct 28, 2022 at 07:48:47PM +0300, Dmitry Baryshkov wrote:
> > Register three UFS symbol clocks (ufs_rx_symbol_0_clk_src,
> > ufs_rx_symbol_1_clk_src ufs_tx_symbol_0_clk_src). Register OF clock
> > provider to let other devices link these clocks through the DT.
> > 
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>

> >  static int qmp_ufs_parse_dt_legacy(struct qmp_ufs *qmp, struct device_node *np)
> >  {
> >  	struct platform_device *pdev = to_platform_device(qmp->dev);
> > @@ -1135,6 +1195,13 @@ static int qmp_ufs_probe(struct platform_device *pdev)
> >  	if (ret)
> >  		goto err_node_put;
> >  
> > +	ret = phy_symbols_clk_register(qmp, np);
> 
> Looks like this should go in probe() instead, or was there a reason for
> not registering these clocks when using the new bindings?

Oops, misread the diff. Please ignore this bit.

> And don't they need to be described in both the old and new bindings
> first either way?

This still applies though (i.e. you need to add #clock-cells to
the bindings).

> > +	if (ret) {
> > +		dev_err(dev, "failed to create symbol clocks, %d\n",
> > +			ret);
> 
> Please use the "...: %d\n" form for consistency.
> 
> But you can probably just drop this error message instead.
> 
> > +		goto err_node_put;
> > +	}
> > +
> >  	qmp->phy = devm_phy_create(dev, np, &qcom_qmp_ufs_phy_ops);
> >  	if (IS_ERR(qmp->phy)) {
> >  		ret = PTR_ERR(qmp->phy);
 
Johan



More information about the linux-phy mailing list