coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
variant.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <acpi/acpi.h>
4 #include <baseboard/variants.h>
5 #include <delay.h>
6 #include <fw_config.h>
7 #include <gpio.h>
8 #include <sar.h>
9 
10 const char *get_wifi_sar_cbfs_filename(void)
11 {
12  const char *filename = NULL;
13 
14  if (fw_config_probe(FW_CONFIG(TABLETMODE, TABLETMODE_ENABLED)))
15  filename = "wifi_sar-cret.hex";
16 
17  return filename;
18 }
19 
20 static void power_off_lte_module(void)
21 {
22  gpio_output(GPP_H17, 0);
23  mdelay(10);
24  gpio_output(GPP_A10, 0);
25 }
26 
27 void variant_smi_sleep(u8 slp_typ)
28 {
29  /*
30  * Once the FW_CONFIG is provisioned, power off LTE module only under
31  * the situation where it is stuffed.
32  */
33  if (slp_typ == ACPI_S5)
35 }
#define GPP_H17
#define GPP_A10
void mdelay(unsigned int msecs)
Definition: delay.c:2
#define FW_CONFIG(__field, __option)
Definition: fw_config.h:28
const char * get_wifi_sar_cbfs_filename(void)
Definition: variant.c:5
void variant_smi_sleep(u8 slp_typ)
Definition: variant.c:15
static void power_off_lte_module(void)
Definition: variant.c:20
@ ACPI_S5
Definition: acpi.h:1385
void gpio_output(gpio_t gpio, int value)
Definition: gpio.c:194
bool fw_config_probe(const struct fw_config *match)
Definition: fw_config.c:62
#define NULL
Definition: stddef.h:19
uint8_t u8
Definition: stdint.h:45