History log of /optee_os/core/include/kernel/pm.h (Results 1 – 9 of 9)
Revision Date Author Comments
# 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 ...


# 42c3d31b 26-Jul-2024 Thomas Perrot <thomas.perrot@bootlin.com>

kernel: pm: add suspend type hint

When entering suspend type, the suspend level is platform dependent and
can be set to various values depending on these platform. In order to
allow platforms settin

kernel: pm: add suspend type hint

When entering suspend type, the suspend level is platform dependent and
can be set to various values depending on these platform. In order to
allow platforms setting it in a generic way when entering suspend,
reserve some bits in the suspend/resume hint to pass this information.
Driver can then used it in a platform independent way to execute
specific code depending on it.

Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


# 9a4ec172 29-Sep-2023 Patrick Delaunay <patrick.delaunay@foss.st.com>

core: pm: add macro for PM_HINT_STATE access

Add helper macros to read and test the power state hints provided by
the platform during power management state transitions.

Reviewed-by: Etienne Carrie

core: pm: add macro for PM_HINT_STATE access

Add helper macros to read and test the power state hints provided by
the platform during power management state transitions.

Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

show more ...


# f61c7bcc 07-Jan-2022 Clément Léger <clement.leger@bootlin.com>

core: pm: add documentation for callback name parameter

Fixed missing documentation for name parameter.

Fixes: 502e23ad523 ("core: pm: add a name to registered pm_callback_handle")
Reviewed-by: Eti

core: pm: add documentation for callback name parameter

Fixed missing documentation for name parameter.

Fixes: 502e23ad523 ("core: pm: add a name to registered pm_callback_handle")
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Clément Léger <clement.leger@bootlin.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 ...


# b4bfc9a9 30-Apr-2021 Jens Wiklander <jens.wiklander@linaro.org>

core/include/*/*.h: use U() for unsigned constants

Updates with the U() macro as described in the recently updated coding
guidelines.

Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Acked-by: Je

core/include/*/*.h: use U() for unsigned constants

Updates with the U() macro as described in the recently updated coding
guidelines.

Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 3639b55f 04-May-2020 Jerome Forissier <jerome@forissier.org>

core: rename KEEP_INIT() and KEEP_PAGER()

The KEEP_INIT() and KEEP_PAGER() macros are quite often used in C files
immediately after the definition of a function or a structure without a
blank line i

core: rename KEEP_INIT() and KEEP_PAGER()

The KEEP_INIT() and KEEP_PAGER() macros are quite often used in C files
immediately after the definition of a function or a structure without a
blank line in between. This style mimics what the Linux kernel does for
a similar use cases: EXPORT_SYMBOL().

Unfortunately, the checkpatch.pl tool expects a blank line after
structure and function definitions, except for a few special cases such
as EXPORT_SYMBOL(). As a result we often get unwanted warnings when we
use KEEP_INIT() and KEEP_PAGER(). Among the exceptions are all words
starting with DECLARE_ or DEFINE_, so by renaming our macros we could
avoid the checkpatch warnings.

This commit renames KEEP_INIT() and KEEP_PAGER() to DECLARE_KEEP_INIT()
and DECLARE_KEEP_PAGER(), respectively. The assembler macros are also
renamed for consistency. No functional change is expected.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 5d47b773 18-Dec-2018 Etienne Carriere <etienne.carriere@linaro.org>

core: pm: helper register_pm_core_service_cb()

Introduce inline helper function register_pm_core_service_cb() to
simplifies registration of core service PM callbacks:

help:
register_pm_core_servi

core: pm: helper register_pm_core_service_cb()

Introduce inline helper function register_pm_core_service_cb() to
simplifies registration of core service PM callbacks:

help:
register_pm_core_service_cb(my_callback, my_handle);
instead of generic:
register_pm_cb(&PM_CALLBACK_HANDLE_INITIALIZER(
my_callback, my_handle,
PM_CB_ORDER_CORE_SERVICE));

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@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 ...