Debian Codegraph @

src/ec/clevo/it5570e/smihandler.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <acpi/acpi.h>
4 #include <cpu/x86/smm.h>
5
6 #include "commands.h"
7 #include "smm.h"
8
9 void ec_smi_apmc(uint8_t apmc)
10 {
11 printk(BIOS_DEBUG, "EC SMI APMC handler\n");
12
13 switch (apmc) {
14 case APM_CNT_ACPI_ENABLE:
15 ec_set_acpi_mode(true);
16 break;
17 case APM_CNT_ACPI_DISABLE:
18 ec_set_acpi_mode(false);
19 break;
20 default:
21 break;
22 }
23 }
24
25 void ec_smi_sleep(uint8_t slp_type)
26 {
27 printk(BIOS_DEBUG, "EC SMI sleep handler\n");
28
29 switch (slp_type) {
30 case ACPI_S4:
31 case ACPI_S5:
32 ec_set_enter_g3_in_s4s5(true);
33 __fallthrough;
34 default:
35 break;
36 }
37 }