coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gpio.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <baseboard/gpio.h>
4 #include <baseboard/variants.h>
5 #include <bootstate.h>
6 #include <fw_config.h>
7 #include <commonlib/helpers.h>
8 
9 /* Pad configuration of stylus */
10 static const struct pad_config stylus_det_pads[] = {
11  /* C12 : AP_PEN_DET_ODL (external pull-high) */
13 };
14 
15 static void fw_config_handle(void *unused)
16 {
17  if (fw_config_probe(FW_CONFIG(STYLUS, STYLUS_PRESENT)))
19 }
#define GPP_C12
@ BS_DEV_ENABLE
Definition: bootstate.h:82
@ BS_ON_ENTRY
Definition: bootstate.h:95
#define ARRAY_SIZE(a)
Definition: helpers.h:12
#define FW_CONFIG(__field, __option)
Definition: fw_config.h:28
bool fw_config_probe(const struct fw_config *match)
Definition: fw_config.c:62
BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL)
static const struct pad_config stylus_det_pads[]
Definition: gpio.c:10
static void fw_config_handle(void *unused)
Definition: gpio.c:15
void gpio_configure_pads(const struct soc_amd_gpio *gpio_list_ptr, size_t size)
program a particular set of GPIO
Definition: gpio.c:307
#define PAD_CFG_GPI_GPIO_DRIVER(pad, pull, rst)
Definition: gpio_defs.h:323
#define NULL
Definition: stddef.h:19
uint16_t unused
Definition: padconfig.h:13