1 /*
2  * Copyright (c) 2021 Sateesh Kotapati
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/init.h>
8 #include <zephyr/drivers/gpio.h>
9 #include <zephyr/sys/printk.h>
10 #include <zephyr/logging/log.h>
11 
12 LOG_MODULE_REGISTER(efr32xg24_ek2703a, CONFIG_BOARD_EFR32MG24_LOG_LEVEL);
13 
board_late_init_hook(void)14 void board_late_init_hook(void)
15 {
16 	int ret;
17 
18 	static struct gpio_dt_spec wake_up_gpio_dev =
19 		GPIO_DT_SPEC_GET(DT_NODELABEL(wake_up_trigger), gpios);
20 
21 	if (!gpio_is_ready_dt(&wake_up_gpio_dev)) {
22 		LOG_ERR("Wake-up GPIO device was not found!\n");
23 	}
24 	ret = gpio_pin_configure_dt(&wake_up_gpio_dev, GPIO_OUTPUT_ACTIVE);
25 	if (ret < 0) {
26 		LOG_ERR("Failed to configure wake-up GPIO!\n");
27 	}
28 }
29