From 2e068035f234b4ff6719df9ff3a41503c9631783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Mon, 28 Oct 2024 16:04:46 +0100 Subject: [PATCH] tests: benchmarks: multicore: idle_uarte: Enable device runtime PM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable runtime PM for UART device is CONFIG_PM_DEVICE_RUNTIME=y. Signed-off-by: Krzysztof Chruściński --- tests/benchmarks/multicore/idle_uarte/src/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/benchmarks/multicore/idle_uarte/src/main.c b/tests/benchmarks/multicore/idle_uarte/src/main.c index 97e3916fa475..746425baef9b 100644 --- a/tests/benchmarks/multicore/idle_uarte/src/main.c +++ b/tests/benchmarks/multicore/idle_uarte/src/main.c @@ -5,6 +5,7 @@ */ #include +#include #include #include @@ -23,6 +24,7 @@ LOG_MODULE_REGISTER(idle_uarte); #define TEST_BUFFER_LEN 10 static const struct device *const uart_dev = DEVICE_DT_GET(UART_NODE); +static const struct device *const console_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console)); const uint8_t test_pattern[TEST_BUFFER_LEN] = {0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x20}; @@ -96,6 +98,11 @@ int main(void) return -1; } + if (IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME)) { + pm_device_runtime_enable(uart_dev); + pm_device_runtime_enable(console_dev); + } + while (1) { printk("Hello\n");