]> git.ipfire.org Git - thirdparty/linux.git/commit
PCI/pwrctrl: Do not power off on pwrctrl device removal
authorChen-Yu Tsai <wenst@chromium.org>
Thu, 26 Feb 2026 09:22:33 +0000 (17:22 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 23 Mar 2026 20:25:32 +0000 (15:25 -0500)
commit2d8c5098b847f37dde8351fb5b5d190f1bb5c576
tree6b8d0640bf801911ad517a775264a1d95f05a50f
parentc369299895a591d96745d6492d4888259b004a9e
PCI/pwrctrl: Do not power off on pwrctrl device removal

With the move to explicit pwrctrl power on/off APIs, the caller, i.e., the
PCI controller driver, should manage the power state. The pwrctrl drivers
should not try to clean up or power off when they are removed, as this
might end up disabling an already disabled regulator, causing a big
warning.  This can be triggered if a PCI controller driver's .remove()
callback calls pci_pwrctrl_destroy_devices() after
pci_pwrctrl_power_off_devices().

Drop the devm cleanup parts that turn off regulators from the pwrctrl
drivers.

Fixes: b921aa3f8dec ("PCI/pwrctrl: Switch to pwrctrl create, power on/off, destroy APIs")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://patch.msgid.link/20260226092234.3859740-1-wenst@chromium.org
drivers/pci/pwrctrl/pci-pwrctrl-pwrseq.c
drivers/pci/pwrctrl/slot.c