lkml.org 
[lkml]   [2023]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 3/6] phy: qcom: Introduce PCIe UNIPHY 28LP driver
    From
    On 03/10/2023 14:08, Nitheesh Sekar wrote:
    > Add Qualcomm PCIe UNIPHY 28LP driver support present
    > in Qualcomm IPQ5018 SoC and the phy init sequence.
    >
    > Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
    > ---

    ...

    > +static int qcom_uniphy_pcie_probe(struct platform_device *pdev)
    > +{
    > + struct qcom_uniphy_pcie *phy;
    > + int ret;
    > + struct phy *generic_phy;
    > + struct phy_provider *phy_provider;
    > + struct device *dev = &pdev->dev;
    > + struct device_node *np = of_node_get(dev->of_node);
    > +
    > + 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;
    > +
    > + ret = qcom_uniphy_pcie_get_resources(pdev, phy);
    > + if (ret < 0) {
    > + dev_err(&pdev->dev, "failed to get resources: %d\n", ret);
    > + return ret;

    Syntax is:
    return dev_err_probe()


    > + }
    > +
    > + ret = phy_pipe_clk_register(phy, np);
    > + if (ret)
    > + dev_err(&pdev->dev, "failed to register phy pipe clk\n");
    > +
    > + generic_phy = devm_phy_create(phy->dev, NULL, &pcie_ops);
    > + if (IS_ERR(generic_phy))
    > + return PTR_ERR(generic_phy);
    > +
    > + phy_set_drvdata(generic_phy, phy);
    > + phy_provider = devm_of_phy_provider_register(phy->dev,
    > + of_phy_simple_xlate);
    > + if (IS_ERR(phy_provider))
    > + return PTR_ERR(phy_provider);
    > +
    > + return 0;
    > +}
    > +
    > +static struct platform_driver qcom_uniphy_pcie_driver = {
    > + .probe = qcom_uniphy_pcie_probe,
    > + .driver = {
    > + .name = "qcom-uniphy-pcie",
    > + .owner = THIS_MODULE,

    Run coccinelle/coccicheck.

    > + .of_match_table = qcom_uniphy_pcie_id_table,
    > + },
    > +};
    > +
    > +module_platform_driver(qcom_uniphy_pcie_driver);
    > +
    > +MODULE_ALIAS("platform:qcom-uniphy-pcie");

    You should not need MODULE_ALIAS() in normal cases. If you need it,
    usually it means your device ID table is wrong.


    Best regards,
    Krzysztof

    \
     
     \ /
      Last update: 2023-10-04 10:15    [W:4.090 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site