* [PATCH v2] PCI: mediatek-gen3: Update entries to distinguish MediaTek PCIe controller
@ 2022-04-22 7:09 Jianjun Wang
2022-04-22 8:14 ` AngeloGioacchino Del Regno
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jianjun Wang @ 2022-04-22 7:09 UTC (permalink / raw)
To: Lorenzo Pieralisi, Rob Herring, Krzysztof Wilczyński,
Bjorn Helgaas, AngeloGioacchino Del Regno
Cc: Ryder Lee, Jianjun Wang, Matthias Brugger, linux-pci,
linux-kernel, linux-mediatek, linux-arm-kernel
Update driver entries in pcie-mediatek-gen3.c to distinguish the
MediaTek PCIe controllers.
Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
---
Changes in v2:
Remove the changes in Kconfig description and update the commit message.
---
drivers/pci/controller/pcie-mediatek-gen3.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
index 7705d61fba4c..6745076a02b9 100644
--- a/drivers/pci/controller/pcie-mediatek-gen3.c
+++ b/drivers/pci/controller/pcie-mediatek-gen3.c
@@ -1011,21 +1011,21 @@ static const struct dev_pm_ops mtk_pcie_pm_ops = {
mtk_pcie_resume_noirq)
};
-static const struct of_device_id mtk_pcie_of_match[] = {
+static const struct of_device_id mtk_pcie_gen3_of_match[] = {
{ .compatible = "mediatek,mt8192-pcie" },
{},
};
-MODULE_DEVICE_TABLE(of, mtk_pcie_of_match);
+MODULE_DEVICE_TABLE(of, mtk_pcie_gen3_of_match);
-static struct platform_driver mtk_pcie_driver = {
+static struct platform_driver mtk_pcie_driver_gen3 = {
.probe = mtk_pcie_probe,
.remove = mtk_pcie_remove,
.driver = {
- .name = "mtk-pcie",
- .of_match_table = mtk_pcie_of_match,
+ .name = "mtk-pcie-gen3",
+ .of_match_table = mtk_pcie_gen3_of_match,
.pm = &mtk_pcie_pm_ops,
},
};
-module_platform_driver(mtk_pcie_driver);
+module_platform_driver(mtk_pcie_driver_gen3);
MODULE_LICENSE("GPL v2");
--
2.18.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] PCI: mediatek-gen3: Update entries to distinguish MediaTek PCIe controller
2022-04-22 7:09 [PATCH v2] PCI: mediatek-gen3: Update entries to distinguish MediaTek PCIe controller Jianjun Wang
@ 2022-04-22 8:14 ` AngeloGioacchino Del Regno
2022-04-22 8:38 ` Rex-BC Chen
2022-04-22 16:21 ` Bjorn Helgaas
2 siblings, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-04-22 8:14 UTC (permalink / raw)
To: Jianjun Wang, Lorenzo Pieralisi, Rob Herring,
Krzysztof Wilczyński, Bjorn Helgaas
Cc: Ryder Lee, Matthias Brugger, linux-pci, linux-kernel,
linux-mediatek, linux-arm-kernel
Il 22/04/22 09:09, Jianjun Wang ha scritto:
> Update driver entries in pcie-mediatek-gen3.c to distinguish the
> MediaTek PCIe controllers.
>
> Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] PCI: mediatek-gen3: Update entries to distinguish MediaTek PCIe controller
2022-04-22 7:09 [PATCH v2] PCI: mediatek-gen3: Update entries to distinguish MediaTek PCIe controller Jianjun Wang
2022-04-22 8:14 ` AngeloGioacchino Del Regno
@ 2022-04-22 8:38 ` Rex-BC Chen
2022-04-22 16:21 ` Bjorn Helgaas
2 siblings, 0 replies; 4+ messages in thread
From: Rex-BC Chen @ 2022-04-22 8:38 UTC (permalink / raw)
To: Jianjun Wang, Lorenzo Pieralisi, Rob Herring,
Krzysztof Wilczyński, Bjorn Helgaas,
AngeloGioacchino Del Regno
Cc: Ryder Lee, Matthias Brugger, linux-pci, linux-kernel,
linux-mediatek, linux-arm-kernel
On Fri, 2022-04-22 at 15:09 +0800, Jianjun Wang wrote:
> Update driver entries in pcie-mediatek-gen3.c to distinguish the
> MediaTek PCIe controllers.
>
> Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
> Reviewed-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@collabora.com>
>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] PCI: mediatek-gen3: Update entries to distinguish MediaTek PCIe controller
2022-04-22 7:09 [PATCH v2] PCI: mediatek-gen3: Update entries to distinguish MediaTek PCIe controller Jianjun Wang
2022-04-22 8:14 ` AngeloGioacchino Del Regno
2022-04-22 8:38 ` Rex-BC Chen
@ 2022-04-22 16:21 ` Bjorn Helgaas
2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2022-04-22 16:21 UTC (permalink / raw)
To: Jianjun Wang
Cc: Lorenzo Pieralisi, Rob Herring, Krzysztof Wilczyński,
Bjorn Helgaas, AngeloGioacchino Del Regno, Ryder Lee,
Matthias Brugger, linux-pci, linux-kernel, linux-mediatek,
linux-arm-kernel
On Fri, Apr 22, 2022 at 03:09:08PM +0800, Jianjun Wang wrote:
> Update driver entries in pcie-mediatek-gen3.c to distinguish the
> MediaTek PCIe controllers.
What's the reason for doing this? I *think* it has something to do
with the fact that we currently have two "mtk_pcie_driver"
definitions: one in pcie-mediatek.c and the other in
pcie-mediatek-gen3.c, and apparently we want to make them different.
I can buy that. But there are many other symbols with the same names
in the two drivers, e.g., mtk_pcie_probe(), mtk_pcie_remove(). Why is
mtk_pcie_driver special?
Maybe it's important that the of_device_id[] names be different?
This change is fine; I'd just like the commit log to have a little
more explanation of *why* it is useful.
Nit: I don't think this distinguishes the *controllers*. It looks
like it distinguishes the *drivers*.
> Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
> ---
> Changes in v2:
> Remove the changes in Kconfig description and update the commit message.
> ---
> drivers/pci/controller/pcie-mediatek-gen3.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
> index 7705d61fba4c..6745076a02b9 100644
> --- a/drivers/pci/controller/pcie-mediatek-gen3.c
> +++ b/drivers/pci/controller/pcie-mediatek-gen3.c
> @@ -1011,21 +1011,21 @@ static const struct dev_pm_ops mtk_pcie_pm_ops = {
> mtk_pcie_resume_noirq)
> };
>
> -static const struct of_device_id mtk_pcie_of_match[] = {
> +static const struct of_device_id mtk_pcie_gen3_of_match[] = {
> { .compatible = "mediatek,mt8192-pcie" },
> {},
> };
> -MODULE_DEVICE_TABLE(of, mtk_pcie_of_match);
> +MODULE_DEVICE_TABLE(of, mtk_pcie_gen3_of_match);
>
> -static struct platform_driver mtk_pcie_driver = {
> +static struct platform_driver mtk_pcie_driver_gen3 = {
> .probe = mtk_pcie_probe,
> .remove = mtk_pcie_remove,
> .driver = {
> - .name = "mtk-pcie",
> - .of_match_table = mtk_pcie_of_match,
> + .name = "mtk-pcie-gen3",
> + .of_match_table = mtk_pcie_gen3_of_match,
> .pm = &mtk_pcie_pm_ops,
> },
> };
>
> -module_platform_driver(mtk_pcie_driver);
> +module_platform_driver(mtk_pcie_driver_gen3);
> MODULE_LICENSE("GPL v2");
> --
> 2.18.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-22 16:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22 7:09 [PATCH v2] PCI: mediatek-gen3: Update entries to distinguish MediaTek PCIe controller Jianjun Wang
2022-04-22 8:14 ` AngeloGioacchino Del Regno
2022-04-22 8:38 ` Rex-BC Chen
2022-04-22 16:21 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).