| #
da5e7ba5 |
| 28-Aug-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: pm: add unregister_pm_cb()
Add unregister_pm_cb() API function and its helper variants to allow unregistering a PM callback entry. This can be needed for example in the GPIO framework where gp
core: pm: add unregister_pm_cb()
Add unregister_pm_cb() API function and its helper variants to allow unregistering a PM callback entry. This can be needed for example in the GPIO framework where gpio_put() can release a GPIO that a driver no more consumed. In case a PM callback was previously registered for such a GPIO, consumer driver needs mean to unregister it.
This change implies that the PM callbacks list is protected from concurrent accesses hence add a lock for that purpose.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
3430d816 |
| 08-Dec-2021 |
Lionel Debieve <lionel.debieve@foss.st.com> |
core: pm: fix incorrect flag check in pm_callback
Fix test error check that always return true with current condition. The check must be done to identify if the SUSPENDED flag has been set.
Fixes:
core: pm: fix incorrect flag check in pm_callback
Fix test error check that always return true with current condition. The check must be done to identify if the SUSPENDED flag has been set.
Fixes: 5920ec258f16 ("core: kernel: pm: refine suspend/resume sequence order") Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
36ebac6d |
| 02-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: kernel: pm: initialize local variables
Initialize local variables in pm_change_state().
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@
core: kernel: pm: initialize local variables
Initialize local variables in pm_change_state().
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
5920ec25 |
| 02-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: kernel: pm: refine suspend/resume sequence order
Change PM generic implementation to call handlers for suspend in the reserve order in which they were registered and to call handlers for resum
core: kernel: pm: refine suspend/resume sequence order
Change PM generic implementation to call handlers for suspend in the reserve order in which they were registered and to call handlers for resume in the opposite order, that is the order in which the handlers where registered.
This change allows to reuse the driver initialization ordering which is expected to match device drivers dependencies. This change will be even more useful when using probe support and dependencies resolution.
The change does not affect the 2 PM registration levels: core and drivers. Core handlers are still suspends after drivers and resumed before drivers.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Gatien Chevallier <gatien.chevallier@st.com>
show more ...
|
| #
502e23ad |
| 02-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: pm: add a name to registered pm_callback_handle
Adds an argument to register a name (string debug identifier) for PM handlers registered to PM framework.
Caller can provide a NULL reference o
core: pm: add a name to registered pm_callback_handle
Adds an argument to register a name (string debug identifier) for PM handlers registered to PM framework.
Caller can provide a NULL reference or a valid string pointer. When pager is enabled, the registration ensures the name lies in an unpaged section, possibly allocating heap for that purpose.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Gatien Chevallier <gatien.chevallier@st.com>
show more ...
|
| #
ffc1ebb2 |
| 02-Mar-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: kernel: pm.c: add missing header stdlib.h
This commit explicitly includes stdlib.h to use realloc() function.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome
core: kernel: pm.c: add missing header stdlib.h
This commit explicitly includes stdlib.h to use realloc() function.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
b7c94e43 |
| 14-Dec-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: framework to register PM callbacks
Introduce a framework for power management callback registering.
Drivers and services can register a callback function for the platform suspend and resume s
core: framework to register PM callbacks
Introduce a framework for power management callback registering.
Drivers and services can register a callback function for the platform suspend and resume sequences. A private address handle can be registered with the callback and retrieved from the callback. Callback can be registered with a specific call order as defined per PM_CB_ORDER_*.
Callback shall return an error if failing to complete target transition. This information may be used by the platform to resume a platform on non-fatal failure to suspend.
Callbacks are related to a callback level. It defines the callbacks call ordering, allowing core low level drivers (as clocks or the GIC) to be suspended after all drivers and resume before these.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Cedric Neveux <cedric.neveux@nxp.com>
show more ...
|