diff options
author | Vic Yang <victoryang@chromium.org> | 2013-08-28 10:28:08 +0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-09-04 05:45:52 +0000 |
commit | 2270f2bb03c2031bad455ba5f8179a9d99cc3999 (patch) | |
tree | 496418ddfebf04e0b010c9916bb7b6f0c0036d5d /chip/stm32/spi.c | |
parent | b99f91310721c50ea30fd204aa127928af37a41f (diff) | |
download | chrome-ec-2270f2bb03c2031bad455ba5f8179a9d99cc3999.tar.gz |
Fix a bug that GPIO cannot be set as input on stm32l
GPIO_INPUT is defined as 0, and any GPIO flag cannot be examined against
GPIO_INPUT. Change GPIO_INPUT to non-zero value to avoid this.
BUG=chrome-os-partner:22275
TEST=On Kirby, set a GPIO to output and pull it low, and then set it back to
input. Check it can be pull high externally.
TEST=Build all boards.
TEST=Boot link and spring.
BRANCH=None (unless this bug hits some other boards.)
Change-Id: I84b9936c24af538ac59c36129fda27ca879bf9d1
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/167190
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'chip/stm32/spi.c')
-rw-r--r-- | chip/stm32/spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/stm32/spi.c b/chip/stm32/spi.c index a646f8143e..d11b696672 100644 --- a/chip/stm32/spi.c +++ b/chip/stm32/spi.c @@ -495,7 +495,7 @@ static void spi_chipset_shutdown(void) state = SPI_STATE_DISABLED; /* Disable pullup and interrupts on NSS */ - gpio_set_flags(GPIO_SPI1_NSS, 0); + gpio_set_flags(GPIO_SPI1_NSS, GPIO_INPUT); /* Set SPI pins to inputs so we don't leak power when AP is off */ gpio_config_module(MODULE_SPI, 0); |