diff options
| author | Cédric Le Goater <clg@kaod.org> | 2023-06-07 06:39:36 +0200 |
|---|---|---|
| committer | Cédric Le Goater <clg@kaod.org> | 2023-09-01 11:40:04 +0200 |
| commit | 8a211fa3b2189735177f3c529dabc8ebc37042fa (patch) | |
| tree | 841d2d2d2cd898bb1aa37c4b2b2374023e71f54a /include | |
| parent | 243975c0553a61646e7c24beaa12f4451536ea6b (diff) | |
| download | focaccia-qemu-8a211fa3b2189735177f3c529dabc8ebc37042fa.tar.gz focaccia-qemu-8a211fa3b2189735177f3c529dabc8ebc37042fa.zip | |
hw/ssi: Introduce a ssi_get_cs() helper
Simple routine to retrieve a DeviceState object on a SPI bus using its CS index. It will be useful for the board to wire the CS lines. Cc: Alistair Francis <alistair@alistair23.me> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/hw/ssi/ssi.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/ssi/ssi.h b/include/hw/ssi/ssi.h index c5bdf1f216..3cdcbd5390 100644 --- a/include/hw/ssi/ssi.h +++ b/include/hw/ssi/ssi.h @@ -112,4 +112,6 @@ SSIBus *ssi_create_bus(DeviceState *parent, const char *name); uint32_t ssi_transfer(SSIBus *bus, uint32_t val); +DeviceState *ssi_get_cs(SSIBus *bus, uint8_t cs_index); + #endif |