]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI/pwrctrl: Add pwrctrl driver for PCI slots
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thu, 16 Jan 2025 14:09:15 +0000 (19:39 +0530)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Fri, 21 Feb 2025 01:03:39 +0000 (01:03 +0000)
commit75996c92f4de309f855471927e6489f5a354cfd4
treed850933ddd228ac352d46df20532e756fcefe909
parent2a95c1f3468bbeb4222e90f27a8f1c94d87e1df6
PCI/pwrctrl: Add pwrctrl driver for PCI slots

This driver is used to control the power state of the devices attached to
the PCI slots. Currently, it controls the voltage rails of the PCI slots
defined in the devicetree node of the root port.

The voltage rails for PCI slots are documented in the DT-schema:

  https://github.com/devicetree-org/dt-schema/blob/v2024.11/dtschema/schemas/pci/pci-bus-common.yaml#L153

Since this driver has to work with different kind of slots (PCIe
x1/x4/x8/x16, Mini PCIe, PCI, etc.), the driver is thus using the
of_regulator_bulk_get_all() API to obtain the voltage regulators defined
in the DT node, instead of hardcoding them.

As such, the DT node of the root port should define the relevant supply
properties corresponding to the voltage rails of the PCI slot.

Tested-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20250116-pci-pwrctrl-slot-v3-5-827473c8fbf4@linaro.org
[kwilczynski: commit log]
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
drivers/pci/pwrctrl/Kconfig
drivers/pci/pwrctrl/Makefile
drivers/pci/pwrctrl/slot.c [new file with mode: 0644]