summaryrefslogtreecommitdiff
path: root/chip/host/gpio.c
diff options
context:
space:
mode:
authorCraig Hesling <hesling@chromium.org>2019-07-01 12:21:49 -0700
committerCommit Bot <commit-bot@chromium.org>2019-07-18 00:15:57 +0000
commitdca00fcd76546d28f64dfc805c548d9fb34a7ba4 (patch)
tree22c7fd5a2c1d31dcd1e6fb0541b74180aba4213f /chip/host/gpio.c
parent048e8abbb05ec7758045cb43dbc71fa1ecc93fbe (diff)
downloadchrome-ec-dca00fcd76546d28f64dfc805c548d9fb34a7ba4.tar.gz
chip/host: Add spi+trng support, and add gpio func
This adds fake SPI Master and TRNG support to the host target. This change also adds the missing emulated gpio interface function. Although general purpose, these changes are setup for allowing fuzzing of the FPMCU specific host commands. Thus, they do not impact any outstanding code. BRANCH=none BUG=b:116065496 TEST=make buildall -j Change-Id: Icfc40e7bf8ee421a4c3ad15377fd56ae68c763d7 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1684223 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'chip/host/gpio.c')
-rw-r--r--chip/host/gpio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/chip/host/gpio.c b/chip/host/gpio.c
index 343e780bd0..6033902720 100644
--- a/chip/host/gpio.c
+++ b/chip/host/gpio.c
@@ -62,6 +62,12 @@ test_mockable int gpio_enable_interrupt(enum gpio_signal signal)
return EC_SUCCESS;
}
+test_mockable int gpio_disable_interrupt(enum gpio_signal signal)
+{
+ gpio_interrupt_enabled[signal] = 0;
+ return EC_SUCCESS;
+}
+
test_mockable int gpio_clear_pending_interrupt(enum gpio_signal signal)
{
return EC_SUCCESS;