Skip to content

Commit d68cc3d

Browse files
MulinChaonashif
authored andcommitted
console: introduce UART console input expired mechanism options.
This CL introduces two configuration options which allows a notification to the power management module that the UART console module is in use now. If the interval of console module doesn't receive any input message exceeds expired timeout, the power management module is allowed to enter sleep/deep sleep state and turn off the clock of console module. This mechanism gives a window in which the users can organize input message if CONFIG_PM is enabled. Signed-off-by: Mulin Chao <[email protected]>
1 parent 7b7129b commit d68cc3d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

drivers/console/Kconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,27 @@ config UART_CONSOLE_MCUMGR
8181
process mcumgr frames, but it hands them up to a higher level module
8282
(e.g., the shell). If unset, incoming mcumgr frames are dropped.
8383

84+
config UART_CONSOLE_INPUT_EXPIRED
85+
bool "Enable support for UART console input expired mechanism"
86+
default y
87+
depends on UART_CONSOLE && PM
88+
help
89+
This option allows a notification to the power management module that
90+
the module for UART console is in use now. If the interval of console
91+
module doesn't receive any input message exceeds expired timeout, such
92+
as UART_CONSOLE_INPUT_EXPIRED_TIMEOUT, the power management module is
93+
allowed to enter sleep/deep sleep state and turn off the clock of UART
94+
console module. This mechanism gives a window in which the users can
95+
organize input message if CONFIG_PM is enabled.
96+
97+
config UART_CONSOLE_INPUT_EXPIRED_TIMEOUT
98+
int "Fixed amount of time to keep the UART console in use flag true"
99+
default 15000
100+
depends on UART_CONSOLE_INPUT_EXPIRED
101+
help
102+
Fixed amount of time which unit is milliseconds to keep the UART
103+
console in use flag true.
104+
84105
config USB_UART_CONSOLE
85106
bool "Use USB port for console outputs"
86107
select UART_CONSOLE

0 commit comments

Comments
 (0)