summaryrefslogtreecommitdiff
path: root/src/mainboard/google/guado
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/guado')
-rw-r--r--src/mainboard/google/guado/chromeos.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/mainboard/google/guado/chromeos.c b/src/mainboard/google/guado/chromeos.c
index 094447de0d..13fbfc3dea 100644
--- a/src/mainboard/google/guado/chromeos.c
+++ b/src/mainboard/google/guado/chromeos.c
@@ -33,24 +33,18 @@
#ifndef __PRE_RAM__
#include <boot/coreboot_tables.h>
-#define GPIO_COUNT 6
-
void fill_lb_gpios(struct lb_gpios *gpios)
{
- struct lb_gpio *gpio;
-
- gpios->size = sizeof(*gpios) + (GPIO_COUNT * sizeof(struct lb_gpio));
- gpios->count = GPIO_COUNT;
-
- gpio = gpios->gpios;
- fill_lb_gpio(gpio++, GPIO_SPI_WP, ACTIVE_HIGH, "write protect", 0);
- fill_lb_gpio(gpio++, GPIO_REC_MODE, ACTIVE_LOW, "recovery",
- get_recovery_mode_switch());
- fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "developer",
- get_developer_mode_switch());
- fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "lid", 1);
- fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "power", 0);
- fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", gfx_get_init_done());
+ struct lb_gpio chromeos_gpios[] = {
+ {GPIO_SPI_WP, ACTIVE_HIGH, 0, "write protect"},
+ {GPIO_REC_MODE, ACTIVE_LOW,
+ get_recovery_mode_switch(), "recovery"},
+ {-1, ACTIVE_HIGH, get_developer_mode_switch(), "developer"},
+ {-1, ACTIVE_HIGH, 1, "lid"},
+ {-1, ACTIVE_HIGH, 0, "power"},
+ {-1, ACTIVE_HIGH, gfx_get_init_done(), "oprom"},
+ };
+ lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
}
#endif