Debian Codegraph @

src/mainboard/google/eve/smihandler.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <cpu/x86/smm.h>
4 #include <ec/google/chromeec/smm.h>
5 #include <gpio.h>
6 #include <intelblocks/smihandler.h>
7 #include "ec.h"
8 #include "gpio.h"
9
10 void mainboard_smi_espi_handler(void)
11 {
12 chromeec_smi_process_events();
13 }
14
15 static void mainboard_gpio_smi_sleep(u8 slp_typ)
16 {
17 /* Power down the rails on any sleep type */
18 gpio_set(EN_PP3300_DX_CAM, 0);
19
20 /* Assert TOUSHCREEN_STOP_L */
21 gpio_set(GPP_E11, 0);
22
23 /* Turn off touchscreen power */
24 gpio_set(GPP_C22, 0);
25 }
26
27 void mainboard_smi_sleep(u8 slp_typ)
28 {
29 chromeec_smi_sleep(slp_typ, MAINBOARD_EC_S3_WAKE_EVENTS,
30 MAINBOARD_EC_S5_WAKE_EVENTS);
31 chromeec_smi_device_event_sleep(slp_typ,
32 MAINBOARD_EC_S3_DEVICE_EVENTS, 0);
33 mainboard_gpio_smi_sleep(slp_typ);
34 }
35
36 int mainboard_smi_apmc(u8 apmc)
37 {
38 chromeec_smi_apmc(apmc, MAINBOARD_EC_SCI_EVENTS,
39 MAINBOARD_EC_SMI_EVENTS);
40 return 0;
41 }