[riot-devel] Discussion of Power Management
kaspar at schleiser.de
Thu Aug 31 17:02:01 CEST 2017
On 08/31/2017 04:37 PM, Robert Hartung wrote:
>> - if not, possibly e.g., kinetis_common has pm_set(), then that should
>> depend on pm_layered
> This means that kinetis_common should provide a module
> **kinetis_common_pm** that provides pm_set. The CPU should then depend
> on this module. Additionally, it should select pm_layered.
>> - if not, it depends on periph_pm_fallback (which should wrap current
> In this case we use the existing pm_* functions from
> drivers/periph_common/pm.c, but I would move them to the module I
> created (pm_fallback?).
> I am working on a pm_fallback module (moved it from drivers/periph/pm.c
> to sys/pm_fallback/pm.c) - is that the right location? Or where should
> it be located?
I think as the periph common code is in drivers/, so should the fallback
How about using submodules within drivers/periph_common/Makefile? E.g.,
- rename drivers/periph_common/pm.c to pm_fallback.c
# exclude submodule sources from *.c wildcard source selection
SRC := $(pm_fallback.c,$(wildcard *.c))
- add "PSEUDOMODULES += periph_common_%" to makefiles/pseudomodules.mk
That would compile pm_fallback *only* if periph_common_pm_fallback is
selected. (with #5757, all periph files will become submodules...)
kinetis_common/periph/pm.c can just go (and be replaced with a
dependency on the cortem_common code).
More information about the devel