Debian Codegraph @

src/mainboard/google/dedede/variants/magolor/gpio.c

raw symbols SCIP
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) */
12 PAD_CFG_GPI_GPIO_DRIVER(GPP_C12, NONE, DEEP),
13 };
14
15 static void fw_config_handle(void *unused)
16 {
17 if (fw_config_probe(FW_CONFIG(STYLUS, STYLUS_PRESENT)))
18 gpio_configure_pads(stylus_det_pads, ARRAY_SIZE(stylus_det_pads));
19 }
20 BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);