1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <boot/coreboot_tables.h>
8 void fill_lb_gpios(struct lb_gpios
*gpios
)
10 struct lb_gpio chromeos_gpios
[] = {
11 {POWER_BUTTON
, ACTIVE_LOW
, -1, "power"},
12 {EC_IN_RW
, ACTIVE_HIGH
, -1, "EC in RW"},
13 {AP_SYS_RESET_L
, ACTIVE_LOW
, -1, "reset"},
15 lb_add_gpios(gpios
, chromeos_gpios
, ARRAY_SIZE(chromeos_gpios
));
18 int get_write_protect_state(void)
20 return !gpio_get(WRITE_PROTECT_L
);
23 int get_ec_is_trusted(void)
25 /* EC is trusted if not in RW. */
26 return !gpio_get(EC_IN_RW
);