From 6578475d93c2584942bf58601ee0b07fd925838b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sun, 22 Dec 2013 03:12:38 +0200 Subject: ChromeOS: Use common fill_lb_gpio() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2ba7a1c2b2e6ce2c00c9a2916141bed67930ba2d Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/5586 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Paul Menzel --- src/lib/coreboot_table.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/lib/coreboot_table.c') diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c index 8e7f85d..fbc1902 100644 --- a/src/lib/coreboot_table.c +++ b/src/lib/coreboot_table.c @@ -145,6 +145,17 @@ static void lb_framebuffer(struct lb_header *header) } #if CONFIG_CHROMEOS +void fill_lb_gpio(struct lb_gpio *gpio, int num, + int polarity, const char *name, int value) +{ + memset(gpio, 0, sizeof(*gpio)); + gpio->port = num; + gpio->polarity = polarity; + if (value >= 0) + gpio->value = value; + strncpy((char *)gpio->name, name, GPIO_MAX_NAME_LENGTH); +} + static void lb_gpios(struct lb_header *header) { struct lb_gpios *gpios; -- cgit v1.1