[PATCH] ACPI: scan: Drop power resource references for deferred devices
Peixin Xie
peixin.xie at linux.spacemit.com
Mon Aug 17 20:41:10 PDT 2026
On Wed, Aug 12, 2026 at 03:15:27PM +0200, Rafael J. Wysocki wrote:
> Have you considered dropping the acpi_bus_init_power() call from
> acpi_bus_get_power_flags() and doing it only once when the device gets
> ready for enumeration?
Thank you for the suggestion. I tested this approach on the SpacemiT K3
platform and it works as expected.
In addition to removing the acpi_bus_init_power() call, I set
device->flags.initialized to false at the end of acpi_bus_get_power_flags()
to mark the device power state as not yet initialized. This causes the
existing path in acpi_bus_attach() to call acpi_bus_init_power() once the
device is ready for enumeration.
The power resource references are now balanced and runtime suspend and
resume continue to work correctly. I will send a v2 in next couple days.
More information about the linux-riscv
mailing list