RE: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP mode support for ls1028a
> > Caution: EXT Email > > yes, it is more about sort the list using .data and .compatible. key > > much better if it we keep this as suggested by Frank, > > static const struct of_device_id ls_pcie_ep_of_match[] = { > + { .compatible = "fsl,ls1028a-pcie-ep", .data = _ep_drvdata }, > { .compatible = "fsl,ls1046a-pcie-ep", .data = _ep_drvdata }, > { .compatible = "fsl,ls1088a-pcie-ep", .data = _ep_drvdata }, Thanks, v3 sent. Frank Li > > > > Thanks, > > Alok
Re: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP mode support for ls1028a
yes, it is more about sort the list using .data and .compatible. key much better if it we keep this as suggested by Frank, static const struct of_device_id ls_pcie_ep_of_match[] = { + { .compatible = "fsl,ls1028a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,ls1046a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,ls1088a-pcie-ep", .data = _ep_drvdata }, Thanks, Alok On 2/9/2023 3:53 AM, Bjorn Helgaas wrote: On Tue, Feb 07, 2023 at 04:20:21PM +0000, Frank Li wrote: Subject: Re: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP mode support for ls1028a { .compatible = "fsl,ls1046a-pcie-ep", .data = _ep_drvdata }, + { .compatible = "fsl,ls1028a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,ls1088a-pcie-ep", .data = _ep_drvdata }, can it be like this for better readability. ? It is just chip name and follow name conversion, which already upstreamed and documented. Why do you think it not is good readability? I thought maybe ALOK's point was to sort the list, which does make a lot of sense. But if you want to sort by the .data member, I would think you would make .compatible a secondary sort key, which means ls1028a would come before ls1046a, so you would end up with this instead: static const struct of_device_id ls_pcie_ep_of_match[] = { + { .compatible = "fsl,ls1028a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,ls1046a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,ls1088a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,ls2088a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,lx2160ar2-pcie-ep", .data = _ep_drvdata }, { }, };
Re: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP mode support for ls1028a
On Tue, Feb 07, 2023 at 04:20:21PM +, Frank Li wrote: > > Subject: Re: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP > > mode support for ls1028a > > > > { .compatible = "fsl,ls1046a-pcie-ep", .data = _ep_drvdata }, > > + { .compatible = "fsl,ls1028a-pcie-ep", .data = _ep_drvdata }, > > { .compatible = "fsl,ls1088a-pcie-ep", .data = _ep_drvdata }, > > > > can it be like this for better readability. ? > > It is just chip name and follow name conversion, which already > upstreamed and documented. > > Why do you think it not is good readability? I thought maybe ALOK's point was to sort the list, which does make a lot of sense. But if you want to sort by the .data member, I would think you would make .compatible a secondary sort key, which means ls1028a would come before ls1046a, so you would end up with this instead: static const struct of_device_id ls_pcie_ep_of_match[] = { + { .compatible = "fsl,ls1028a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,ls1046a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,ls1088a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,ls2088a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,lx2160ar2-pcie-ep", .data = _ep_drvdata }, { }, };
RE: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP mode support for ls1028a
> Subject: Re: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP > mode support for ls1028a > > Caution: EXT Email > > { .compatible = "fsl,ls1046a-pcie-ep", .data = _ep_drvdata }, > + { .compatible = "fsl,ls1028a-pcie-ep", .data = _ep_drvdata }, > { .compatible = "fsl,ls1088a-pcie-ep", .data = _ep_drvdata }, > > can it be like this for better readability. ? It is just chip name and follow name conversion, which already upstreamed and documented. Why do you think it not is good readability? Frank Li > > Thanks, > Alok >
Re: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP mode support for ls1028a
{ .compatible = "fsl,ls1046a-pcie-ep", .data = _ep_drvdata }, + { .compatible = "fsl,ls1028a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,ls1088a-pcie-ep", .data = _ep_drvdata }, can it be like this for better readability. ? Thanks, Alok On 2/2/2023 11:11 PM, Frank Li wrote: Subject: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP mode support for ls1028a Caution: EXT Email From: Xiaowei Bao Add PCIe EP mode support for ls1028a. Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Signed-off-by: Frank Li Acked-by: Roy Zang [Frank Li] ping --- Added Signed-off-by: Frank Li Acked-by: Roy Zang All other patches were already accepte by maintainer in https://urldefense.com/v3/__https://eur01.safelinks.protection.outlook.com/?url=https*3A*2F*2Flore.k__;JSUl!!ACWV5N9M2RV99hQ!PIKq0-lb3ccjBcAZNFo48kfWvbGPlh7_Wiws1olaNdTthUzhcGFrpLbw3vOMDaeops5LkajDO_y_vGPyuhE$ ernel.org%2Flkml%2F2022223457.10599-1- leoyang.li%40nxp.com%2F=05%7C01%7Cfrank.li%40nxp.com%7C29d1 5c05d59346e552be08daf4d573e5%7C686ea1d3bc2b4c6fa92cd99c5c301635% 7C0%7C0%7C638091494850726163%7CUnknown%7CTWFpbGZsb3d8eyJWIjo iMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C30 00%7C%7C%7C=0wnHTyuX%2FyLAiioKNvlFbBM83nVyF%2FCdhqsEmV f2sI4%3D=0 But missed this one. Re-post. drivers/pci/controller/dwc/pci-layerscape-ep.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/dwc/pci-layerscape-ep.c b/drivers/pci/controller/dwc/pci-layerscape-ep.c index ad99707b3b99..ed5cfc9408d9 100644 --- a/drivers/pci/controller/dwc/pci-layerscape-ep.c +++ b/drivers/pci/controller/dwc/pci-layerscape-ep.c @@ -112,6 +112,7 @@ static const struct ls_pcie_ep_drvdata lx2_ep_drvdata = { static const struct of_device_id ls_pcie_ep_of_match[] = { { .compatible = "fsl,ls1046a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,ls1088a-pcie-ep", .data = _ep_drvdata }, + { .compatible = "fsl,ls1028a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,ls2088a-pcie-ep", .data = _ep_drvdata }, { .compatible = "fsl,lx2160ar2-pcie-ep", .data = _ep_drvdata }, { }, -- 2.34.1