diff options
author | Simon Glass <sjg@chromium.org> | 2012-05-08 10:46:34 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2012-05-10 14:16:07 -0700 |
commit | 9a5b4927c9985304ff63053408c07edbcd1dab93 (patch) | |
tree | c95a63710a634de20666d2594ddef9820d2e6cb6 /chip/stm32/gpio.c | |
parent | 8d48971e917b22a98adab4e6c64fdca667b21e26 (diff) | |
download | chrome-ec-9a5b4927c9985304ff63053408c07edbcd1dab93.tar.gz |
stm32: Add a generic gpio library
Much of the code in gpio-stmxxx.c is duplicated. Also the gpio_get_name()
function is not present in the new file.
Create a common gpio.c file to hold this function, and hopefully other
code in the future.
BUG=none
TEST=build on all platforms, boot on daisy
Change-Id: I4ab33e0e5c52843b770fabc777c917493abccffe
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'chip/stm32/gpio.c')
-rw-r--r-- | chip/stm32/gpio.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chip/stm32/gpio.c b/chip/stm32/gpio.c new file mode 100644 index 0000000000..a2d5b4daf7 --- /dev/null +++ b/chip/stm32/gpio.c @@ -0,0 +1,16 @@ +/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* Common GPIO module for Chrome EC */ + +#include "board.h" +#include "gpio.h" + + +const char *gpio_get_name(enum gpio_signal signal) +{ + return gpio_list[signal].name; +} + |