diff options
author | Simon Glass <sjg@chromium.org> | 2012-05-02 19:41:44 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2012-05-03 22:05:57 -0700 |
commit | ea845714fd4cc163002ca1bbd3c14ab4e35ed3ec (patch) | |
tree | adde94a28e4f8d1c544a63061437c315439ae012 /chip/lm4/gpio.c | |
parent | b67e435d143d4d4b7478134fbeb869fba6476c7b (diff) | |
download | chrome-ec-ea845714fd4cc163002ca1bbd3c14ab4e35ed3ec.tar.gz |
Add gpio_get_name() to return the name of a signal
Add this to the GPIO API. It seems that the implementation is copied
in LM4 and STM32 so I have reluctantly done the same with this new
function.
BUG=chrome-os-partner:9424
TEST=build and boot on Daisy
Change-Id: Ifddc52e69b2b33af2645384c0171dd264e588fcd
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'chip/lm4/gpio.c')
-rw-r--r-- | chip/lm4/gpio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chip/lm4/gpio.c b/chip/lm4/gpio.c index 09be616771..fedfedc6e8 100644 --- a/chip/lm4/gpio.c +++ b/chip/lm4/gpio.c @@ -182,6 +182,12 @@ void gpio_set_alternate_function(int port, int mask, int func) } +const char *gpio_get_name(enum gpio_signal signal) +{ + return gpio_list[signal].name; +} + + int gpio_get_level(enum gpio_signal signal) { return LM4_GPIO_DATA(gpio_list[signal].port, |