-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Introduce CONFIG_PM_DEVICE_RUNTIME_DEFAULT_ENABLE
#93720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Introduce CONFIG_PM_DEVICE_RUNTIME_DEFAULT_ENABLE
#93720
Conversation
fbc6e7f
to
4b360c0
Compare
Many SoCs which use PM_DEVICE_RUNTIME need every device in the system to have PM_DEVICE_RUNTIME enabled to function. Currently, this is only possible by adding zephyr,pm-device-runtime-auto; to every node in every devicetree which could potentially implement device power management. This is very error prone since its easy to miss a node, especially if users apply overlays, where users need to know and remember to apply or reapply this property. This commit adds a Kconfig, disabled by default, which automatically treats every device as if it had the zephyr,pm-device-runtime-auto property added to every node. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
Enable CONFIG_PM_DEVICE_RUNTIME_DEFAULT_ENABLE by default for all nordic SoCs if CONFIG_PM_DEVICE_RUNTIME is used. This will ensure consistent behavior across all nordic SoCs and remove the need for pasting the devicetree propert zephyr,pm-device-runtime-auto everywhere. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
4b360c0
to
0352a64
Compare
Remote the redundant zephyr,pm-device-runtime-auto property from nordic devicetree nodes as these are now implicitly set by CONFIG_PM_DEVICE_RUNTIME_DEFAULT_ENABLE=y at the SoC level. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
0352a64
to
2f14d77
Compare
|
CONFIG_PM_DEVICE_RUNTIME_DEFAULT_ENABLE
I'm not against this, but what is the reasoning behind this
I've never had a situation where only enabling PM on some devices was problematic. |
The reasoning is the 100+ redundant occurrences of |
Introduce the option
config PM_DEVICE_RUNTIME_DEFAULT_ENABLE
which effectively implicitly adds the devicetree flagzephyr,pm-device-runtime-auto
to every node in the devicetree. In reality, it ignores the flag and enables PM_DEVICE_RUNTIME unconditionally, but the behavior is identical from the outside.Typically, SoCs which utilize PM_DEVICE_RUNTIME need it enabled for every device. Having to add a flag manually to every node all of the devicetrees for these SoCs is tedious and error prone. It is also a software property being set in the devicetree, so in multiple ways a problematic pattern.
All of nordics SoCs require all devices to enable
PM_DEVICE_RUNTIME
ifPM_DEVICE_RUNTIME
is enabled. It looks like this also is the case for Ambiq Apollo (@AlessandroLuo @RichardSWheatley @aaronyegx) and Xtensa Ace (@dcpleung @andyross @nashif), please check if this option would be helpful for your platforms as well :)