| 1 |
|
| 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 |
|
| 10 |
static const struct pad_config stylus_det_pads[] = { |
| 11 |
|
| 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); |