diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2013-12-22 03:12:38 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-05-01 15:40:11 +0200 |
commit | 6578475d93c2584942bf58601ee0b07fd925838b (patch) | |
tree | 3a458dec26d8e00ccad429c5aaf4ba152b162287 /src/lib | |
parent | 9ab1c106c3ec88adfefc0dfe237e538e33f2750d (diff) |
ChromeOS: Use common fill_lb_gpio()
Change-Id: I2ba7a1c2b2e6ce2c00c9a2916141bed67930ba2d
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/5586
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/coreboot_table.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c index 8e7f85d353..fbc1902f9a 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; |