[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACMJSesnFjFuUhWnM2ecNP2S-eNCT-Gx5pGF-eb748gXRNRgsg@mail.gmail.com>
Date: Wed, 23 Oct 2024 11:22:56 +0200
From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
To: manivannan.sadhasivam@...aro.org
Cc: Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org, Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Johan Hovold <johan+linaro@...nel.org>, Abel Vesa <abel.vesa@...aro.org>,
Stephan Gerhold <stephan.gerhold@...aro.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Bjorn Andersson <bjorn.andersson@....qualcomm.com>, stable+noautosel@...nel.org
Subject: Re: [PATCH 2/5] PCI/pwrctl: Create pwrctl devices only if at least
one power supply is present
On Tue, 22 Oct 2024 at 12:28, Manivannan Sadhasivam via B4 Relay
<devnull+manivannan.sadhasivam.linaro.org@...nel.org> wrote:
>
> From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
>
> Currently, pwrctl devices are created if the corresponding PCI nodes are
> defined in devicetree. But this is not correct, because not all PCI nodes
> defined in devicetree require pwrctl support. Pwrctl comes into picture
> only when the device requires kernel to manage its power state. This can
> be determined using the power supply properties present in the devicetree
> node of the device.
>
> So add a new API, of_pci_is_supply_present() that checks the devicetree
> node if at least one power supply property is present or not. If present,
> then the pwrctl device will be created for that PCI node. Otherwise, it
> will be skipped.
>
> Cc: stable+noautosel@...nel.org # Depends on of_platform_device_create() rework
> Fixes: 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node")
> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
> ---
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Powered by blists - more mailing lists