-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Move power subsystem to new power states #31273
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
Conversation
samples/boards/mec15xxevb_assy6853/power_management/src/power_mgmt.c
Outdated
Show resolved
Hide resolved
pabigot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is quite right yet but I also don't think we know enough to say what's right, so I have no objections or changes requested. Will wait until CI passes for a final check before approving.
@erwango please revisit your nak.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to match #31162 (comment), but I guess that can be fixed later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment was not super conclusive and was not clear about EM2 and EM3, also right now is not clear how to distinguish between them, so just keep this way for clarity sake.
Migrate the whole pm subsystem to use new power states information from power_state.h and get states and residency properties from device tree. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Remove conditionals (PM_DEEP_SLEEP_STATES and PM_SLEEP_STATES) from power management code. Now these features are always available when power management is enabled. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Power management require stubs for pm_power_state_set() and pm_power_state_exit_post_ops(). Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Residency time and power states are defined using device tree now. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
There are platforms that have multiple states that maps to a specific Zephyr power state. To accommodate this sort of situation this commit adds an additional property to a power state that can be used by the platform. The power state now consists of two properties, a category and a substate-id. The former property is the current power state. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Change subsystem to use struct pm_state with substate-id instead of using only the power state category. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Power management requires core interrupt handling. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This targets was previously enabling PM but the code was doing nothing because the logic was under an unsatisfied ifdef condition. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining build failures in https://buildkite.com/zephyr/zephyr/builds/18862 don't seem related to anything I'm concerned with.
Later: They're not: see #31530
erwango
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like it!
Still missing: