All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Nitheesh Sekar <quic_nsekar@quicinc.com>,
	agross@kernel.org, andersson@kernel.org,
	konrad.dybcio@linaro.org, lpieralisi@kernel.org, kw@linux.com,
	robh@kernel.org, bhelgaas@google.com,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	vkoul@kernel.org, kishon@kernel.org, mani@kernel.org,
	p.zabel@pengutronix.de, quic_srichara@quicinc.com,
	quic_varada@quicinc.com, quic_ipkumar@quicinc.com,
	linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-phy@lists.infradead.org
Subject: Re: [PATCH 3/6] phy: qcom: Introduce PCIe UNIPHY 28LP driver
Date: Wed, 4 Oct 2023 10:13:52 +0200	[thread overview]
Message-ID: <959363c6-9ecb-4e5f-960d-65dd23b74ce2@kernel.org> (raw)
In-Reply-To: <20231003120846.28626-4-quic_nsekar@quicinc.com>

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


WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Nitheesh Sekar <quic_nsekar@quicinc.com>,
	agross@kernel.org, andersson@kernel.org,
	konrad.dybcio@linaro.org, lpieralisi@kernel.org, kw@linux.com,
	robh@kernel.org, bhelgaas@google.com,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	vkoul@kernel.org, kishon@kernel.org, mani@kernel.org,
	p.zabel@pengutronix.de, quic_srichara@quicinc.com,
	quic_varada@quicinc.com, quic_ipkumar@quicinc.com,
	linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-phy@lists.infradead.org
Subject: Re: [PATCH 3/6] phy: qcom: Introduce PCIe UNIPHY 28LP driver
Date: Wed, 4 Oct 2023 10:13:52 +0200	[thread overview]
Message-ID: <959363c6-9ecb-4e5f-960d-65dd23b74ce2@kernel.org> (raw)
In-Reply-To: <20231003120846.28626-4-quic_nsekar@quicinc.com>

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


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  parent reply	other threads:[~2023-10-04  8:14 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03 12:08 [PATCH 0/6] Enable IPQ5018 PCI support Nitheesh Sekar
2023-10-03 12:08 ` Nitheesh Sekar
2023-10-03 12:08 ` [PATCH 1/6] dt-bindings: phy: qcom,uniphy-pcie: Document PCIe uniphy Nitheesh Sekar
2023-10-03 12:08   ` Nitheesh Sekar
2023-10-04  6:57   ` Krzysztof Kozlowski
2023-10-04  6:57     ` Krzysztof Kozlowski
2023-10-05  2:53     ` Nitheesh Sekar
2023-10-05  2:53       ` Nitheesh Sekar
2023-10-03 12:08 ` [PATCH 2/6] dt-bindings: PCI: qcom: Add IPQ5108 SoC Nitheesh Sekar
2023-10-03 12:08   ` Nitheesh Sekar
2023-10-04  6:59   ` Krzysztof Kozlowski
2023-10-04  6:59     ` Krzysztof Kozlowski
2023-10-07  0:25   ` Konrad Dybcio
2023-10-07  0:25     ` Konrad Dybcio
2023-10-09  9:10     ` Nitheesh Sekar
2023-10-09  9:10       ` Nitheesh Sekar
2023-10-03 12:08 ` [PATCH 3/6] phy: qcom: Introduce PCIe UNIPHY 28LP driver Nitheesh Sekar
2023-10-03 12:08   ` Nitheesh Sekar
2023-10-03 15:15   ` Dmitry Baryshkov
2023-10-03 15:15     ` Dmitry Baryshkov
2023-10-04  8:13   ` Krzysztof Kozlowski [this message]
2023-10-04  8:13     ` Krzysztof Kozlowski
2023-10-05  2:55     ` Nitheesh Sekar
2023-10-05  2:55       ` Nitheesh Sekar
2023-10-04 17:27   ` Robert Marko
2023-10-04 17:27     ` Robert Marko
2023-10-03 12:08 ` [PATCH 4/6] PCI: qcom: Add support for IPQ5018 Nitheesh Sekar
2023-10-03 12:08   ` Nitheesh Sekar
2023-10-03 15:19   ` Dmitry Baryshkov
2023-10-03 15:19     ` Dmitry Baryshkov
2023-10-09 17:32   ` Manivannan Sadhasivam
2023-10-09 17:32     ` Manivannan Sadhasivam
2023-10-03 12:08 ` [PATCH 5/6] arm64: dts: qcom: ipq5018: Add PCIe related nodes Nitheesh Sekar
2023-10-03 12:08   ` Nitheesh Sekar
2023-10-03 15:23   ` Dmitry Baryshkov
2023-10-03 15:23     ` Dmitry Baryshkov
2023-10-03 17:29     ` Nitheesh Sekar
2023-10-03 17:29       ` Nitheesh Sekar
2023-10-09 17:17   ` Manivannan Sadhasivam
2023-10-09 17:17     ` Manivannan Sadhasivam
2023-10-03 12:08 ` [PATCH 6/6] arm64: dts: qcom: ipq5018: Enable PCIe Nitheesh Sekar
2023-10-03 12:08   ` Nitheesh Sekar
2023-10-07  0:27   ` Konrad Dybcio
2023-10-07  0:27     ` Konrad Dybcio
2023-10-09  6:15     ` Nitheesh Sekar
2023-10-09  6:15       ` Nitheesh Sekar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=959363c6-9ecb-4e5f-960d-65dd23b74ce2@kernel.org \
    --to=krzk@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kishon@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=quic_ipkumar@quicinc.com \
    --cc=quic_nsekar@quicinc.com \
    --cc=quic_srichara@quicinc.com \
    --cc=quic_varada@quicinc.com \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.