RT-Thread Version
5.2.2
Hardware Type/Architectures
power-management
Develop Toolchain
Other
Describe the bug
@GuEe-GUI
Hi GuEe,
While diving into the rt_dm_power_domain framework, I noticed an interesting behavior regarding the hierarchical topology, and I'd like to understand the original design intent from the authors.
Currently, rt_dm_power_domain_register_child() sets child->parent_domain = parent, but it never links the child to the parent's child_nodes list. As a result, the top-down recursive power_on/off logic for child nodes is effectively bypassed.
Additionally, there is no bottom-up dependency guarantee (e.g., ref-counting to ensure a parent is automatically pulled up before a child). Right now, provider drivers seem to be handling these dependencies manually.
Before suggesting any architectural changes, I'd love to hear from the original authors or maintainers: Was this specific behavior intentional?
For instance:
Is this designed for specific SoCs where the hardware itself handles hierarchical power dependencies, rendering software-side list traversal and ref-counting unnecessary?
Was it a deliberate lightweight choice to keep the framework simple and avoid the overhead of a full GenPD-like tree topology?
Or is it simply an early placeholder structure where the topology logic just hasn't been fully closed yet?
Understanding the background and hardware considerations behind this design will really help clarify how we should use and evolve this API. Looking forward to your insights!
Other additional context
No response
RT-Thread Version
5.2.2
Hardware Type/Architectures
power-management
Develop Toolchain
Other
Describe the bug
@GuEe-GUI
Hi GuEe,
While diving into the rt_dm_power_domain framework, I noticed an interesting behavior regarding the hierarchical topology, and I'd like to understand the original design intent from the authors.
Currently, rt_dm_power_domain_register_child() sets child->parent_domain = parent, but it never links the child to the parent's child_nodes list. As a result, the top-down recursive power_on/off logic for child nodes is effectively bypassed.
Additionally, there is no bottom-up dependency guarantee (e.g., ref-counting to ensure a parent is automatically pulled up before a child). Right now, provider drivers seem to be handling these dependencies manually.
Before suggesting any architectural changes, I'd love to hear from the original authors or maintainers: Was this specific behavior intentional?
For instance:
Is this designed for specific SoCs where the hardware itself handles hierarchical power dependencies, rendering software-side list traversal and ref-counting unnecessary?
Was it a deliberate lightweight choice to keep the framework simple and avoid the overhead of a full GenPD-like tree topology?
Or is it simply an early placeholder structure where the topology logic just hasn't been fully closed yet?
Understanding the background and hardware considerations behind this design will really help clarify how we should use and evolve this API. Looking forward to your insights!
Other additional context
No response