1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <baseboard/gpio.h>
4 #include <baseboard/variants.h>
7 #include <commonlib/helpers.h>
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
),
15 static void fw_config_handle(void *unused
)
17 if (fw_config_probe(FW_CONFIG(STYLUS
, STYLUS_PRESENT
)))
18 gpio_configure_pads(stylus_det_pads
, ARRAY_SIZE(stylus_det_pads
));
20 BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE
, BS_ON_ENTRY
, fw_config_handle
, NULL
);