1 /*
2  * Copyright (c) 2020 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/init.h>
8 #include <zephyr/logging/log.h>
9 
10 #include <hal/nrf_gpiote.h>
11 
12 LOG_MODULE_REGISTER(nrf5340_audio_dk_nrf5340_cpuapp, CONFIG_LOG_DEFAULT_LEVEL);
13 
core_config(void)14 static int core_config(void)
15 {
16 	nrf_gpiote_latency_t latency;
17 
18 	latency = nrf_gpiote_latency_get(NRF_GPIOTE);
19 
20 	if (latency != NRF_GPIOTE_LATENCY_LOWPOWER) {
21 		LOG_DBG("Setting gpiote latency to low power");
22 		nrf_gpiote_latency_set(NRF_GPIOTE, NRF_GPIOTE_LATENCY_LOWPOWER);
23 	}
24 
25 	return 0;
26 }
27 
28 SYS_INIT(core_config, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
29