Skip to content

Commit eea52e0

Browse files
authored
Merge pull request #710 from FrameworkComputer/fwk.enable_chassis_interrput
fwk: enable chassis interrupt when EC power on
2 parents fbe367a + 363b9eb commit eea52e0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

zephyr/program/lotus/azalea/interrupts.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,10 @@
5252
flags = <GPIO_INT_EDGE_BOTH>;
5353
handler = "lid_interrupt";
5454
};
55+
int_chassis_open: chassis_open {
56+
irq-pin = <&gpio_chassis_open_l>;
57+
flags = <GPIO_INT_EDGE_BOTH>;
58+
handler = "chassis_interrupt_handler";
59+
};
5560
};
5661
};

zephyr/program/lotus/src/board_function.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include "ec_commands.h"
1616
#include "extpower.h"
1717
#include "flash_storage.h"
18+
#include "gpio/gpio_int.h"
19+
#include "gpio.h"
1820
#include "hooks.h"
1921
#include "system.h"
2022
#include "util.h"
@@ -183,6 +185,7 @@ static void bios_function_init(void)
183185
#ifdef CONFIG_BOARD_LOTUS
184186
set_detect_mode(flash_storage_get(FLASH_FLAGS_INPUT_MODULE_POWER));
185187
#endif
188+
gpio_enable_dt_interrupt(GPIO_INT_FROM_NODELABEL(int_chassis_open));
186189
check_chassis_open();
187190
}
188191
DECLARE_HOOK(HOOK_INIT, bios_function_init, HOOK_PRIO_DEFAULT + 1);

0 commit comments

Comments
 (0)