summaryrefslogtreecommitdiff
path: root/src/include/spi-generic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/spi-generic.h')
-rw-r--r--src/include/spi-generic.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/include/spi-generic.h b/src/include/spi-generic.h
index 7c53611d79..c8b209da21 100644
--- a/src/include/spi-generic.h
+++ b/src/include/spi-generic.h
@@ -48,11 +48,12 @@ void spi_init(void);
*
* bus: Bus ID of the slave chip.
* cs: Chip select ID of the slave chip on the specified bus.
+ * slave: Pointer to slave structure that needs to be initialized.
*
- * Returns: A spi_slave reference that can be used in subsequent SPI
- * calls, or NULL if one or more of the parameters are not supported.
+ * Returns:
+ * 0 on success, -1 on error
*/
-struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs);
+int spi_setup_slave(unsigned int bus, unsigned int cs, struct spi_slave *slave);
/*-----------------------------------------------------------------------
* Claim the bus and prepare it for communication with a given slave.