Re: [PATCH v8 2/7] phy: qcom: Introduce PCIe UNIPHY 28LP driver

From: Varadarajan Narayanan
Date: Tue Jan 28 2025 - 00:25:35 EST


On Mon, Jan 27, 2025 at 04:16:32PM +0100, Konrad Dybcio wrote:
> On 27.01.2025 8:28 AM, Varadarajan Narayanan wrote:
> > From: Nitheesh Sekar <quic_nsekar@xxxxxxxxxxx>
> >
> > Add Qualcomm PCIe UNIPHY 28LP driver support present
> > in Qualcomm IPQ5332 SoC and the phy init sequence.
> >
> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
> > Signed-off-by: Nitheesh Sekar <quic_nsekar@xxxxxxxxxxx>
> > Signed-off-by: Varadarajan Narayanan <quic_varada@xxxxxxxxxxx>
> > ---
>
> [...]
>
> > + usleep_range(CLK_EN_DELAY_MIN_US, CLK_EN_DELAY_MAX_US);
> > +
> > + qcom_uniphy_pcie_init(phy);
> > + return 0;
>
> Please add a newline before the return statement
>
> [...]
>
> > +static int qcom_uniphy_pcie_probe(struct platform_device *pdev)
> > +{
> > + struct phy_provider *phy_provider;
> > + struct device *dev = &pdev->dev;
> > + struct qcom_uniphy_pcie *phy;
> > + struct phy *generic_phy;
> > + int ret;
> > +
> > + phy = devm_kzalloc(&pdev->dev, sizeof(*phy), GFP_KERNEL);
> > + if (!phy)
> > + return -ENOMEM;
> > +
> > + platform_set_drvdata(pdev, phy);
> > + phy->dev = &pdev->dev;
> > +
> > + phy->data = of_device_get_match_data(dev);
> > + if (!phy->data)
> > + return -EINVAL;
> > +
> > + phy->lanes = 1;
> > + if (of_property_read_u32(dev_of_node(dev), "num-lanes", &phy->lanes))
> > + dev_info(dev, "Not able to get num-lanes. Assuming 1\n");
>
> return dev_err_probe(dev, ret, "Couldn't read num-lanes\n");
>
> And please make num-lanes required in bindings there
>
> We don't want silent fallbacks in such cases, as it's easy to miss those and
> e.g. ship a product which would then run the PCIe link at half the speed

Sure, will post a new version.

Thanks
Varada