Skip to content

Conversation

@ceolin
Copy link
Member

@ceolin ceolin commented Jan 12, 2021

  • Move power states and residency info to DTS
  • Remove old power states

Still missing:

  • some platform information in DTS
  • Get rid of weak functions and move to new API proposed in another PR
  • Use new constraint API
  • Constraints don't apply to substate.

@ceolin ceolin requested a review from erwango January 21, 2021 22:58
@ceolin ceolin changed the title WIP: Move power subsystem to new power states Move power subsystem to new power states Jan 21, 2021
@ceolin ceolin linked an issue Jan 21, 2021 that may be closed by this pull request
@ceolin ceolin removed the DNM This PR should not be merged (Do Not Merge) label Jan 21, 2021
Copy link
Contributor

@pabigot pabigot left a 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.

Copy link
Contributor

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.

Copy link
Member Author

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.

@pabigot pabigot removed the dev-review To be discussed in dev-review meeting label Jan 22, 2021
Flavio Ceolin added 8 commits January 21, 2021 23:37
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>
Copy link
Contributor

@pabigot pabigot left a 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

@nashif nashif dismissed erwango’s stale review January 22, 2021 13:15

please revisit

Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build failure w/twister and SDK 0.12.1 related to

7 participants