From: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org> To: Bjorn Helgaas <helgaas-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, Lorenzo Pieralisi <lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> Subject: Re: [PATCH v3 1/6] PCI: rockchip: Create individual folder for rockchip drivers Date: Wed, 21 Mar 2018 09:04:21 +0800 [thread overview] Message-ID: <879a4862-d0d5-21fd-6c47-029c795fe78e@rock-chips.com> (raw) In-Reply-To: <20180320174633.GA137590-1RhO1Y9PlrlHTL0Zs8A6p5iNqAH0jzoTYJqu5kTmcBRl57MIdRCFDg@public.gmane.org> Dear Bjorn, Lorenzo On 2018/3/21 1:46, Bjorn Helgaas wrote: > On Tue, Mar 06, 2018 at 10:43:22AM +0800, Shawn Lin wrote: >> In preparation for introducing End-Point driver for Rockchip >> PCIe controller, we create a new folder to follow the convention >> of dwc and cadence. Then we rename the host driver from pcie-rockchip.c >> to pcie-rockchip-host.c, and only leave some common functions in >> pcie-rockchip.c in order to be reused for both of host and EP drivers. >> >> Signed-off-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org> >> Tested-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org> >> ... > >> diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig >> index 34b56a8..b85ad40 100644 >> --- a/drivers/pci/Kconfig >> +++ b/drivers/pci/Kconfig >> @@ -141,4 +141,5 @@ source "drivers/pci/cadence/Kconfig" >> source "drivers/pci/dwc/Kconfig" >> source "drivers/pci/host/Kconfig" >> source "drivers/pci/endpoint/Kconfig" >> +source "drivers/pci/rockchip/Kconfig" >> source "drivers/pci/switch/Kconfig" > > Why is this out of order? This seems exactly analogous to > drivers/pci/cadence and dwc, so they should be next to each other. This confused me as well! I just put "rockchip" before "switch" to keep the order, but I didn't know why "endpoint" wasn't ordered. > >> diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile >> index 9419709..8434afb 100644 >> --- a/drivers/pci/Makefile >> +++ b/drivers/pci/Makefile >> @@ -55,6 +55,8 @@ obj-y += switch/ >> >> obj-$(CONFIG_PCI_ENDPOINT) += endpoint/ >> >> +obj-$(CONFIG_PCIE_ROCKCHIP) += rockchip/ >> + >> # Endpoint library must be initialized before its users >> obj-$(CONFIG_PCIE_CADENCE) += cadence/ >> # pcie-hisi.o quirks are needed even without CONFIG_PCIE_DW > > Similarly here. > > I admit to still being a little dubious about the idea of a bunch of > vendor-specific directories, each containing a completely trivial > Makefile, a mostly-trivial Kconfig, a header file, a shared .c file, a > host .c file, and an endpoint .c file. So do I. > > One alternative would be to keep the single pcie-rockchip.c file with > an #ifdef CONFIG_PCIE_ROCKCHIP_HOST section and an #ifdef > CONFIG_PCIE_ROCKCHIP_EP section. I admit I thought this eariler, however, I don't like it personally, as it confuses the new-comer to follow the convention here, if we are alternatives just for "style issue" or "personal taste". Certainly, I could do that beased on your suggestion, but I would like to know if this's the final agreement both you and Lorenzo reached. :) > > Bjorn > > >
WARNING: multiple messages have this Message-ID (diff)
From: Shawn Lin <shawn.lin@rock-chips.com> To: Bjorn Helgaas <helgaas@kernel.org>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: shawn.lin@rock-chips.com, Bjorn Helgaas <bhelgaas@google.com>, Rob Herring <robh+dt@kernel.org>, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-pci@vger.kernel.org Subject: Re: [PATCH v3 1/6] PCI: rockchip: Create individual folder for rockchip drivers Date: Wed, 21 Mar 2018 09:04:21 +0800 [thread overview] Message-ID: <879a4862-d0d5-21fd-6c47-029c795fe78e@rock-chips.com> (raw) In-Reply-To: <20180320174633.GA137590@bhelgaas-glaptop.roam.corp.google.com> Dear Bjorn, Lorenzo On 2018/3/21 1:46, Bjorn Helgaas wrote: > On Tue, Mar 06, 2018 at 10:43:22AM +0800, Shawn Lin wrote: >> In preparation for introducing End-Point driver for Rockchip >> PCIe controller, we create a new folder to follow the convention >> of dwc and cadence. Then we rename the host driver from pcie-rockchip.c >> to pcie-rockchip-host.c, and only leave some common functions in >> pcie-rockchip.c in order to be reused for both of host and EP drivers. >> >> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> >> Tested-by: Jeffy Chen <jeffy.chen@rock-chips.com> >> ... > >> diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig >> index 34b56a8..b85ad40 100644 >> --- a/drivers/pci/Kconfig >> +++ b/drivers/pci/Kconfig >> @@ -141,4 +141,5 @@ source "drivers/pci/cadence/Kconfig" >> source "drivers/pci/dwc/Kconfig" >> source "drivers/pci/host/Kconfig" >> source "drivers/pci/endpoint/Kconfig" >> +source "drivers/pci/rockchip/Kconfig" >> source "drivers/pci/switch/Kconfig" > > Why is this out of order? This seems exactly analogous to > drivers/pci/cadence and dwc, so they should be next to each other. This confused me as well! I just put "rockchip" before "switch" to keep the order, but I didn't know why "endpoint" wasn't ordered. > >> diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile >> index 9419709..8434afb 100644 >> --- a/drivers/pci/Makefile >> +++ b/drivers/pci/Makefile >> @@ -55,6 +55,8 @@ obj-y += switch/ >> >> obj-$(CONFIG_PCI_ENDPOINT) += endpoint/ >> >> +obj-$(CONFIG_PCIE_ROCKCHIP) += rockchip/ >> + >> # Endpoint library must be initialized before its users >> obj-$(CONFIG_PCIE_CADENCE) += cadence/ >> # pcie-hisi.o quirks are needed even without CONFIG_PCIE_DW > > Similarly here. > > I admit to still being a little dubious about the idea of a bunch of > vendor-specific directories, each containing a completely trivial > Makefile, a mostly-trivial Kconfig, a header file, a shared .c file, a > host .c file, and an endpoint .c file. So do I. > > One alternative would be to keep the single pcie-rockchip.c file with > an #ifdef CONFIG_PCIE_ROCKCHIP_HOST section and an #ifdef > CONFIG_PCIE_ROCKCHIP_EP section. I admit I thought this eariler, however, I don't like it personally, as it confuses the new-comer to follow the convention here, if we are alternatives just for "style issue" or "personal taste". Certainly, I could do that beased on your suggestion, but I would like to know if this's the final agreement both you and Lorenzo reached. :) > > Bjorn > > >
next prev parent reply other threads:[~2018-03-21 1:04 UTC|newest] Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-03-06 2:42 [PATCH v3 0/6] Add endpoint driver for Rockchip PCIe controller Shawn Lin 2018-03-06 2:42 ` Shawn Lin [not found] ` <1520304173-231081-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2018-03-06 2:43 ` [PATCH v3 1/6] PCI: rockchip: Create individual folder for rockchip drivers Shawn Lin 2018-03-06 2:43 ` Shawn Lin [not found] ` <1520304202-232891-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2018-03-20 14:04 ` Lorenzo Pieralisi 2018-03-20 14:04 ` Lorenzo Pieralisi [not found] ` <20180320140431.GA15953-4tUPXFaYRHv6sAKXYmQ0tx/iLCjYCKR+VpNB7YpNyf8@public.gmane.org> 2018-03-21 0:47 ` Shawn Lin 2018-03-21 0:47 ` Shawn Lin 2018-03-20 17:46 ` Bjorn Helgaas 2018-03-20 17:46 ` Bjorn Helgaas [not found] ` <20180320174633.GA137590-1RhO1Y9PlrlHTL0Zs8A6p5iNqAH0jzoTYJqu5kTmcBRl57MIdRCFDg@public.gmane.org> 2018-03-21 1:04 ` Shawn Lin [this message] 2018-03-21 1:04 ` Shawn Lin [not found] ` <879a4862-d0d5-21fd-6c47-029c795fe78e-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2018-03-21 18:19 ` Lorenzo Pieralisi 2018-03-21 18:19 ` Lorenzo Pieralisi [not found] ` <20180321181940.GA9760-4tUPXFaYRHv6sAKXYmQ0tx/iLCjYCKR+VpNB7YpNyf8@public.gmane.org> 2018-03-21 19:30 ` Bjorn Helgaas 2018-03-21 19:30 ` Bjorn Helgaas 2018-03-22 1:03 ` Shawn Lin 2018-03-22 1:03 ` Shawn Lin [not found] ` <7275bd77-016a-2729-482d-2855703d9b56-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2018-03-22 8:47 ` Greg Kroah-Hartman 2018-03-22 8:47 ` Greg Kroah-Hartman [not found] ` <20180322084735.GC6211-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> 2018-03-22 11:09 ` Shawn Lin 2018-03-22 11:09 ` Shawn Lin 2018-03-22 11:30 ` Lorenzo Pieralisi 2018-03-22 11:30 ` Lorenzo Pieralisi 2018-03-06 2:43 ` [PATCH v3 2/6] PCI: rockchip: Split out common function to parse DT Shawn Lin 2018-03-06 2:43 ` Shawn Lin 2018-03-06 2:43 ` [PATCH v3 3/6] PCI: rockchip: Split out common function to init controller Shawn Lin 2018-03-06 2:43 ` Shawn Lin 2018-03-06 2:43 ` [PATCH v3 4/6] dt-bindings: PCI: rockchip: Rename rockchip-pcie.txt to rockchip-pcie-host.txt Shawn Lin 2018-03-06 2:43 ` Shawn Lin 2018-03-06 2:44 ` [PATCH v3 5/6] PCI: rockchip: Add Endpoint controller driver for Rockchip PCIe controller Shawn Lin 2018-03-06 2:44 ` Shawn Lin 2018-03-06 2:44 ` [PATCH v3 6/6] dt-bindings: PCI: rockchip: Add DT bindings for Rockchip PCIe endpoint controller Shawn Lin 2018-03-06 2:44 ` Shawn Lin
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=879a4862-d0d5-21fd-6c47-029c795fe78e@rock-chips.com \ --to=shawn.lin-tnx95d0mmh7dzftrwevzcw@public.gmane.org \ --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \ --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=helgaas-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \ --cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org \ --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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: linkBe 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.