File tree Expand file tree Collapse file tree 5 files changed +17
-14
lines changed Expand file tree Collapse file tree 5 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ menuconfig PM
15
15
16
16
if PM
17
17
18
+ module = PM
19
+ module-str = System Power Management
20
+ source "subsys/logging/Kconfig.template.log_config"
21
+
18
22
config PM_STATS
19
23
bool "System Power Management Stats"
20
24
depends on STATS
@@ -23,11 +27,6 @@ config PM_STATS
23
27
24
28
source "subsys/pm/policy/Kconfig"
25
29
26
- module = PM
27
- module-str = System Power Management
28
- source "subsys/logging/Kconfig.template.log_config"
29
-
30
-
31
30
endif # PM
32
31
33
32
config HAS_NO_SYS_PM
@@ -49,11 +48,19 @@ config PM_DEVICE
49
48
like turning off device clocks and peripherals. The device drivers
50
49
may also save and restore states in these hook functions.
51
50
51
+ if PM_DEVICE
52
+
53
+ module = PM_DEVICE
54
+ module-str = Device Power Management
55
+ source "subsys/logging/Kconfig.template.log_config"
56
+
52
57
config PM_DEVICE_RUNTIME
53
58
bool "Runtime Device Power Management"
54
- depends on PM_DEVICE
55
59
help
56
60
Enable Runtime Power Management to save power. With device runtime PM
57
61
enabled, devices can be suspended or resumed based on the device
58
62
usage even while the CPU or system is running.
63
+
64
+ endif # PM_DEVICE
65
+
59
66
endmenu
Original file line number Diff line number Diff line change 7
7
#include <device.h>
8
8
#include <pm/device.h>
9
9
10
- #define LOG_LEVEL CONFIG_PM_LOG_LEVEL /* From power module Kconfig */
11
10
#include <logging/log.h>
12
- LOG_MODULE_DECLARE ( power );
11
+ LOG_MODULE_REGISTER ( pm_device , CONFIG_PM_DEVICE_LOG_LEVEL );
13
12
14
13
#if defined(CONFIG_PM_DEVICE )
15
14
extern const struct device * __pm_device_slots_start [];
Original file line number Diff line number Diff line change 7
7
#include <sys/__assert.h>
8
8
#include <pm/device_runtime.h>
9
9
10
- #define LOG_LEVEL CONFIG_PM_LOG_LEVEL /* From power module Kconfig */
11
10
#include <logging/log.h>
12
- LOG_MODULE_DECLARE (power );
11
+ LOG_MODULE_DECLARE (pm_device , CONFIG_PM_DEVICE_LOG_LEVEL );
13
12
14
13
/* Device PM request type */
15
14
#define PM_DEVICE_SYNC BIT(0)
Original file line number Diff line number Diff line change 10
10
#include <sys/atomic.h>
11
11
#include <pm/state.h>
12
12
13
- #define LOG_LEVEL CONFIG_PM_LOG_LEVEL /* From power module Kconfig */
14
13
#include <logging/log.h>
15
- LOG_MODULE_DECLARE (power );
14
+ LOG_MODULE_DECLARE (pm , CONFIG_PM_LOG_LEVEL );
16
15
17
16
#define PM_STATES_LEN (1 + PM_STATE_SOFT_OFF - PM_STATE_ACTIVE)
18
17
Original file line number Diff line number Diff line change 17
17
#include "pm_priv.h"
18
18
19
19
#define PM_STATES_LEN (1 + PM_STATE_SOFT_OFF - PM_STATE_ACTIVE)
20
- #define LOG_LEVEL CONFIG_PM_LOG_LEVEL
21
20
#include <logging/log.h>
22
- LOG_MODULE_REGISTER (power );
21
+ LOG_MODULE_REGISTER (pm , CONFIG_PM_LOG_LEVEL );
23
22
24
23
static int post_ops_done = 1 ;
25
24
static struct pm_state_info z_power_state ;
You can’t perform that action at this time.
0 commit comments