diff options
author | Bill Richardson <wfrichar@chromium.org> | 2015-02-11 16:32:06 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-02-20 02:59:52 +0000 |
commit | 62a9075435a02ce299076c928a7d6f70dff5f044 (patch) | |
tree | ab1e8f41f90d62650651059102164d806f143ba3 /common | |
parent | 86340a75d22659a2b57077bdd79a63ef91668320 (diff) | |
download | chrome-ec-62a9075435a02ce299076c928a7d6f70dff5f044.tar.gz |
cleanup: Don't admit the existence of unimplemented gpios
For boards with unimplemented GPIOs, don't display those GPIOs in
the output of "gpioget" or accept them as signal names in "gpioset".
BUG=none
BRANCH=none
TEST=manual
Pick a board with an unimplemented GPIO (search board/*/gpio.inc
for UNIMPLEMENTED), run "gpioget" and "gpioset". It shouldn't
show up.
Change-Id: I343ece7d6df5fa09fda8418e3f3148d74f1540ae
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/251012
Reviewed-by: Sheng-liang Song <ssl@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/gpio.c b/common/gpio.c index 84a4fc1f47..c411584161 100644 --- a/common/gpio.c +++ b/common/gpio.c @@ -30,7 +30,7 @@ static enum gpio_signal find_signal_by_name(const char *name) return GPIO_COUNT; for (i = 0; i < GPIO_COUNT; i++, g++) { - if (!strcasecmp(name, g->name)) + if (g->mask && !strcasecmp(name, g->name)) return i; } |