From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: "Kalle Valo" <kvalo@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konrad.dybcio@linaro.org>,
"Catalin Marinas" <catalin.marinas@arm.com>,
"Will Deacon" <will@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Heiko Stuebner" <heiko@sntech.de>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Chris Morgan" <macromorgan@hotmail.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Arnd Bergmann" <arnd@arndb.de>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Nícolas F . R . A . Prado" <nfraprado@collabora.com>,
"Marek Szyprowski" <m.szyprowski@samsung.com>,
"Peng Fan" <peng.fan@nxp.com>,
"Robert Richter" <rrichter@amd.com>,
"Dan Williams" <dan.j.williams@intel.com>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
"Terry Bowman" <terry.bowman@amd.com>,
"Lukas Wunner" <lukas@wunner.de>,
"Huacai Chen" <chenhuacai@kernel.org>,
"Alex Elder" <elder@linaro.org>,
"Srini Kandagatla" <srinivas.kandagatla@linaro.org>,
"Abel Vesa" <abel.vesa@linaro.org>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org,
"Bartosz Golaszewski" <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH 4/9] PCI: create platform devices for child OF nodes of the port node
Date: Wed, 17 Jan 2024 17:45:37 +0100 [thread overview]
Message-ID: <2024011707-alibi-pregnancy-a64b@gregkh> (raw)
In-Reply-To: <20240117160748.37682-5-brgl@bgdev.pl>
On Wed, Jan 17, 2024 at 05:07:43PM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> In order to introduce PCI power-sequencing, we need to create platform
> devices for child nodes of the port node.
Ick, why a platform device? What is the parent of this device, a PCI
device? If so, then this can't be a platform device, as that's not what
it is, it's something else so make it a device of that type,.
> They will get matched against
> the pwrseq drivers (if one exists) and then the actual PCI device will
> reuse the node once it's detected on the bus.
Reuse it how?
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> drivers/pci/bus.c | 9 ++++++++-
> drivers/pci/remove.c | 3 ++-
> 2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
> index 9c2137dae429..8ab07f711834 100644
> --- a/drivers/pci/bus.c
> +++ b/drivers/pci/bus.c
> @@ -12,6 +12,7 @@
> #include <linux/errno.h>
> #include <linux/ioport.h>
> #include <linux/of.h>
> +#include <linux/of_platform.h>
> #include <linux/proc_fs.h>
> #include <linux/slab.h>
>
> @@ -342,8 +343,14 @@ void pci_bus_add_device(struct pci_dev *dev)
> */
> pcibios_bus_add_device(dev);
> pci_fixup_device(pci_fixup_final, dev);
> - if (pci_is_bridge(dev))
> + if (pci_is_bridge(dev)) {
> of_pci_make_dev_node(dev);
> + retval = of_platform_populate(dev->dev.of_node, NULL, NULL,
> + &dev->dev);
So this is a pci bridge device, not a platform device, please don't do
this, make it a real device of a new type.
thanks,
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: "Kalle Valo" <kvalo@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konrad.dybcio@linaro.org>,
"Catalin Marinas" <catalin.marinas@arm.com>,
"Will Deacon" <will@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Heiko Stuebner" <heiko@sntech.de>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Chris Morgan" <macromorgan@hotmail.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Arnd Bergmann" <arnd@arndb.de>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Nícolas F . R . A . Prado" <nfraprado@collabora.com>,
"Marek Szyprowski" <m.szyprowski@samsung.com>,
"Peng Fan" <peng.fan@nxp.com>,
"Robert Richter" <rrichter@amd.com>,
"Dan Williams" <dan.j.williams@intel.com>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
"Terry Bowman" <terry.bowman@amd.com>,
"Lukas Wunner" <lukas@wunner.de>,
"Huacai Chen" <chenhuacai@kernel.org>,
"Alex Elder" <elder@linaro.org>,
"Srini Kandagatla" <srinivas.kandagatla@linaro.org>,
"Abel Vesa" <abel.vesa@linaro.org>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org,
"Bartosz Golaszewski" <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH 4/9] PCI: create platform devices for child OF nodes of the port node
Date: Wed, 17 Jan 2024 17:45:37 +0100 [thread overview]
Message-ID: <2024011707-alibi-pregnancy-a64b@gregkh> (raw)
In-Reply-To: <20240117160748.37682-5-brgl@bgdev.pl>
On Wed, Jan 17, 2024 at 05:07:43PM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> In order to introduce PCI power-sequencing, we need to create platform
> devices for child nodes of the port node.
Ick, why a platform device? What is the parent of this device, a PCI
device? If so, then this can't be a platform device, as that's not what
it is, it's something else so make it a device of that type,.
> They will get matched against
> the pwrseq drivers (if one exists) and then the actual PCI device will
> reuse the node once it's detected on the bus.
Reuse it how?
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> drivers/pci/bus.c | 9 ++++++++-
> drivers/pci/remove.c | 3 ++-
> 2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
> index 9c2137dae429..8ab07f711834 100644
> --- a/drivers/pci/bus.c
> +++ b/drivers/pci/bus.c
> @@ -12,6 +12,7 @@
> #include <linux/errno.h>
> #include <linux/ioport.h>
> #include <linux/of.h>
> +#include <linux/of_platform.h>
> #include <linux/proc_fs.h>
> #include <linux/slab.h>
>
> @@ -342,8 +343,14 @@ void pci_bus_add_device(struct pci_dev *dev)
> */
> pcibios_bus_add_device(dev);
> pci_fixup_device(pci_fixup_final, dev);
> - if (pci_is_bridge(dev))
> + if (pci_is_bridge(dev)) {
> of_pci_make_dev_node(dev);
> + retval = of_platform_populate(dev->dev.of_node, NULL, NULL,
> + &dev->dev);
So this is a pci bridge device, not a platform device, please don't do
this, make it a real device of a new type.
thanks,
greg k-h
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-01-17 16:45 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 16:07 [PATCH 0/9] PCI: introduce the concept of power sequencing of PCIe devices Bartosz Golaszewski
2024-01-17 16:07 ` Bartosz Golaszewski
2024-01-17 16:07 ` [PATCH 1/9] arm64: dts: qcom: qrb5165-rb5: describe the WLAN module of QCA6390 Bartosz Golaszewski
2024-01-17 16:07 ` Bartosz Golaszewski
2024-01-17 16:07 ` [PATCH 2/9] arm64: dts: qcom: sm8550-qrd: add Wifi nodes Bartosz Golaszewski
2024-01-17 16:07 ` Bartosz Golaszewski
2024-01-17 16:07 ` [PATCH 3/9] arm64: dts: qcom: sm8650-qrd: " Bartosz Golaszewski
2024-01-17 16:07 ` Bartosz Golaszewski
2024-01-17 16:07 ` [PATCH 4/9] PCI: create platform devices for child OF nodes of the port node Bartosz Golaszewski
2024-01-17 16:07 ` Bartosz Golaszewski
2024-01-17 16:22 ` Dan Williams
2024-01-17 16:22 ` Dan Williams
2024-01-18 13:11 ` Bartosz Golaszewski
2024-01-18 13:11 ` Bartosz Golaszewski
2024-01-17 16:45 ` Greg Kroah-Hartman [this message]
2024-01-17 16:45 ` Greg Kroah-Hartman
2024-01-18 10:58 ` Bartosz Golaszewski
2024-01-18 10:58 ` Bartosz Golaszewski
2024-01-18 11:15 ` Greg Kroah-Hartman
2024-01-18 11:15 ` Greg Kroah-Hartman
2024-01-30 21:54 ` Bjorn Andersson
2024-01-30 21:54 ` Bjorn Andersson
2024-01-31 11:04 ` Bartosz Golaszewski
2024-01-31 11:04 ` Bartosz Golaszewski
2024-02-02 0:03 ` Bjorn Andersson
2024-02-02 0:03 ` Bjorn Andersson
2024-02-02 4:50 ` Jeff Johnson
2024-02-02 4:50 ` Jeff Johnson
2024-02-02 10:02 ` Re: " Bartosz Golaszewski
2024-02-02 10:02 ` Bartosz Golaszewski
2024-02-07 16:32 ` Bartosz Golaszewski
2024-02-07 16:32 ` Bartosz Golaszewski
2024-02-14 15:34 ` Greg Kroah-Hartman
2024-02-14 15:34 ` Greg Kroah-Hartman
2024-01-17 16:07 ` [PATCH 5/9] PCI: hold the rescan mutex when scanning for the first time Bartosz Golaszewski
2024-01-17 16:07 ` Bartosz Golaszewski
2024-01-17 16:07 ` [PATCH 6/9] PCI/pwrseq: add pwrseq core code Bartosz Golaszewski
2024-01-17 16:07 ` Bartosz Golaszewski
2024-01-17 16:07 ` [PATCH 7/9] dt-bindings: wireless: ath11k: describe QCA6390 Bartosz Golaszewski
2024-01-17 16:07 ` Bartosz Golaszewski
2024-01-17 16:07 ` [PATCH 8/9] dt-bindings: wireless: ath11k: describe WCN7850 Bartosz Golaszewski
2024-01-17 16:07 ` Bartosz Golaszewski
2024-01-17 18:07 ` Kalle Valo
2024-01-17 18:07 ` Kalle Valo
2024-01-17 20:01 ` Bartosz Golaszewski
2024-01-17 20:01 ` Bartosz Golaszewski
2024-01-17 16:07 ` [PATCH 9/9] PCI/pwrseq: add a pwrseq driver for QCA6390 Bartosz Golaszewski
2024-01-17 16:07 ` Bartosz Golaszewski
2024-01-18 5:49 ` Kalle Valo
2024-01-18 5:49 ` Kalle Valo
2024-01-18 17:50 ` Konrad Dybcio
2024-01-18 17:50 ` Konrad Dybcio
2024-01-17 17:53 ` [PATCH 0/9] PCI: introduce the concept of power sequencing of PCIe devices Neil Armstrong
2024-01-17 17:53 ` Neil Armstrong
2024-01-17 18:16 ` Dmitry Baryshkov
2024-01-17 18:16 ` Dmitry Baryshkov
2024-01-18 18:53 ` Dmitry Baryshkov
2024-01-18 18:53 ` Dmitry Baryshkov
2024-01-19 11:52 ` Bartosz Golaszewski
2024-01-19 11:52 ` Bartosz Golaszewski
2024-01-19 12:31 ` Dmitry Baryshkov
2024-01-19 12:31 ` Dmitry Baryshkov
2024-01-19 13:35 ` brgl
2024-01-19 13:35 ` brgl
2024-01-19 14:07 ` Dmitry Baryshkov
2024-01-19 14:07 ` Dmitry Baryshkov
2024-01-19 14:11 ` Bartosz Golaszewski
2024-01-19 14:11 ` Bartosz Golaszewski
2024-01-19 14:48 ` Bartosz Golaszewski
2024-01-19 14:48 ` Bartosz Golaszewski
2024-01-19 16:34 ` Lukas Wunner
2024-01-19 16:45 ` Rob Herring
2024-01-19 16:45 ` Rob Herring
2024-01-18 14:29 ` Rob Herring
2024-01-18 14:29 ` Rob Herring
2024-01-18 16:38 ` Bartosz Golaszewski
2024-01-18 16:38 ` Bartosz Golaszewski
2024-01-18 16:47 ` Manivannan Sadhasivam
2024-01-18 16:47 ` Manivannan Sadhasivam
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=2024011707-alibi-pregnancy-a64b@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=abel.vesa@linaro.org \
--cc=andersson@kernel.org \
--cc=arnd@arndb.de \
--cc=bartosz.golaszewski@linaro.org \
--cc=bhelgaas@google.com \
--cc=brgl@bgdev.pl \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=conor+dt@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=elder@linaro.org \
--cc=geert+renesas@glider.be \
--cc=heiko@sntech.de \
--cc=jernej.skrabec@gmail.com \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=m.szyprowski@samsung.com \
--cc=macromorgan@hotmail.com \
--cc=neil.armstrong@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=nfraprado@collabora.com \
--cc=pabeni@redhat.com \
--cc=peng.fan@nxp.com \
--cc=robh+dt@kernel.org \
--cc=rrichter@amd.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=terry.bowman@amd.com \
--cc=will@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.