Debian Codegraph @

src/mainboard/google/smaug/chromeos.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <bootmode.h>
4 #include <boot/coreboot_tables.h>
5
6 #include "gpio.h"
7
8 void fill_lb_gpios(struct lb_gpios *gpios)
9 {
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"},
14 };
15 lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
16 }
17
18 int get_write_protect_state(void)
19 {
20 return !gpio_get(WRITE_PROTECT_L);
21 }
22
23 int get_ec_is_trusted(void)
24 {
25 /* EC is trusted if not in RW. */
26 return !gpio_get(EC_IN_RW);
27 }