On 03/10/2023 14:08, Nitheesh Sekar wrote:Sure. will update it and take care of this in future.
Add Qualcomm PCIe UNIPHY 28LP driver support present...
in Qualcomm IPQ5018 SoC and the phy init sequence.
Signed-off-by: Nitheesh Sekar <quic_nsekar@xxxxxxxxxxx>
---
+static int qcom_uniphy_pcie_probe(struct platform_device *pdev)Syntax is:
+{
+ 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;
return dev_err_probe()
Sure. Will do it.
+ }Run coccinelle/coccicheck.
+
+ 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,
Ok. Will remove it.
+ .of_match_table = qcom_uniphy_pcie_id_table,You should not need MODULE_ALIAS() in normal cases. If you need it,
+ },
+};
+
+module_platform_driver(qcom_uniphy_pcie_driver);
+
+MODULE_ALIAS("platform:qcom-uniphy-pcie");
usually it means your device ID table is wrong.