Re: [PATCH] PCI/pwrctrl: Do not power off on pwrctrl device removal

From: Bartosz Golaszewski

Date: Tue Feb 24 2026 - 05:04:53 EST


On Tue, 24 Feb 2026 08:12:56 +0100, Chen-Yu Tsai <wenst@xxxxxxxxxxxx> said:
> With the move to explicit pwrctrl power on/off APIs, the caller, i.e.
> the PCI 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")
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>
> Signed-off-by: Chen-Yu Tsai <wenst@xxxxxxxxxxxx>
> ---
> Hi,
>
> I ran into this while integrating the new pci_pwrctrl_*() API into the
> MediaTek driver. I am sending this separately since this change is
> unrelated and does not conflict with or depend on the other changes for
> the driver itself.
>
> I think this should be merged for fixes.
>

Makes sense.

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>