diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-12-03 16:43:26 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2013-12-09 12:22:18 -0700 |
commit | 6122813fa2cb9eef4a211bd47292322096db9fa8 (patch) | |
tree | e795422d0412c6093736dd1c31b72155e254a5b6 /arch/sandbox/include/asm/state.h | |
parent | afb6134f30db2f97bae81ff56c7c9e4eee07b396 (diff) |
sandbox: spi: Add SPI emulation bus
This adds a SPI framework for people to hook up simulated SPI clients.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/include/asm/state.h')
-rw-r--r-- | arch/sandbox/include/asm/state.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/state.h b/arch/sandbox/include/asm/state.h index 093c81d918..a38820bdee 100644 --- a/arch/sandbox/include/asm/state.h +++ b/arch/sandbox/include/asm/state.h @@ -15,6 +15,11 @@ enum exit_type_id { STATE_EXIT_POWER_OFF, }; +struct sandbox_spi_info { + const char *spec; + const struct sandbox_spi_emu_ops *ops; +}; + /* The complete state of the test system */ struct sandbox_state { const char *cmd; /* Command to execute */ @@ -23,6 +28,10 @@ struct sandbox_state { const char *parse_err; /* Error to report from parsing */ int argc; /* Program arguments */ char **argv; + + /* Pointer to information for each SPI bus/cs */ + struct sandbox_spi_info spi[CONFIG_SANDBOX_SPI_MAX_BUS] + [CONFIG_SANDBOX_SPI_MAX_CS]; }; /** |