Skip to content
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

[RFC] Add support for system suspend/resume handling from kernel #8255

Closed
ramakrishnapallala opened this issue Jun 7, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@ramakrishnapallala
Copy link
Contributor

commented Jun 7, 2018

Add the necessary PM hooks and framework in the kernel to handle system suspend and resume flows.

The goal is to move the common PM logic to kernel make the application less bother about the internal details.

@ramakrishnapallala

This comment has been minimized.

Copy link
Contributor Author

commented Jul 25, 2018

In Zephyr, system power management is handled at application level. In this approach, the application has the full control over the power management flows and its policies.
The application has to implement the _sys_soc_suspend() which is entry function to put the system into low power state and also implement the _sys_soc_resume() which is the exit function for getting the system out of low power states.
Also, an application has to define the power management policy, set up the wake sources and implement the logic for putting the individual drivers in suspend mode on deep sleep entry and resuming them on deep sleep exit.
This approach works well for implementations where the application developer has the full knowledge of the SoC/MCU and wants to have full control over the system state transitions.

But, all implementations might not need a very granular control of system state transitions and might not be interested in knowing all the register level details and power management implementation details of different SoC’s or MCU’s.
Also, applications can expect a generic framework which can handle all the power management flows and it’s board/SoC internal details which save the time of the application developers by allowing them to focus more on their use case or IP.
Additionally, a generic power management framework will allow multiple applications or use cases to re-use the existing SoC’s power management flows and its policies.

This RFC proposes such a framework for handling power management of SoC/board at OS level.
The proposal is to implement _sys_soc_suspend()/_sys_soc_resume() API’s at OS/kernel level and have the common/generic PM sequence/steps implemented as part of them while providing the necessary hooks for the Applications to have custom controls or tuning. This RFC also proposes to have pluggable PM policy implementation which can be re-used across platforms and applications.

This RFC proposes to have a new subsystem ‘power’ under subsys/power which will have the implementation for system suspend/resume flows and will have different pluggable PM policies.

@ramakrishnapallala ramakrishnapallala changed the title Add support for system suspend/resume handling from kernel [RFC] Add support for system suspend/resume handling from kernel Jul 25, 2018

@ramakrishnapallala

This comment has been minimized.

Copy link
Contributor Author

commented Jul 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.