spi: clean up the code in order to reduce the latency

This commit is contained in:
S.J.R. van Schaik 2017-06-14 14:26:11 +02:00
parent f0de762d61
commit 60d316711f
4 changed files with 33 additions and 32 deletions

View file

@ -4,8 +4,8 @@ struct spi_dev;
struct spi_ops {
int (* set_cs_level)(struct spi_dev *dev, int level);
int (* tx_rx)(struct spi_dev *dev, void *rx_buf, const void *tx_buf,
size_t len);
int (* tx_rx)(struct spi_dev *dev, void *rx_buf, size_t rx_len,
const void *tx_buf, size_t tx_len);
};
struct spi_dev {
@ -16,5 +16,5 @@ struct spi_dev {
struct spi_dev *spi_probe(void);
void spi_release(struct spi_dev *dev);
int spi_set_cs_level(struct spi_dev *dev, int level);
int spi_tx_rx(struct spi_dev *dev, void *rx_buf, const void *tx_buf,
size_t len);
int spi_tx_rx(struct spi_dev *dev, void *rx_buf, size_t rx_len,
const void *tx_buf, size_t tx_len);