diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/spi/spi.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 887116dbce2c..000b50bee6c0 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -257,6 +257,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
| 257 | * @queue_lock: spinlock to syncronise access to message queue | 257 | * @queue_lock: spinlock to syncronise access to message queue |
| 258 | * @queue: message queue | 258 | * @queue: message queue |
| 259 | * @cur_msg: the currently in-flight message | 259 | * @cur_msg: the currently in-flight message |
| 260 | * @cur_msg_prepared: spi_prepare_message was called for the currently | ||
| 261 | * in-flight message | ||
| 260 | * @busy: message pump is busy | 262 | * @busy: message pump is busy |
| 261 | * @running: message pump is running | 263 | * @running: message pump is running |
| 262 | * @rt: whether this queue is set to run as a realtime task | 264 | * @rt: whether this queue is set to run as a realtime task |
| @@ -274,6 +276,10 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
| 274 | * @unprepare_transfer_hardware: there are currently no more messages on the | 276 | * @unprepare_transfer_hardware: there are currently no more messages on the |
| 275 | * queue so the subsystem notifies the driver that it may relax the | 277 | * queue so the subsystem notifies the driver that it may relax the |
| 276 | * hardware by issuing this call | 278 | * hardware by issuing this call |
| 279 | * @prepare_message: set up the controller to transfer a single message, | ||
| 280 | * for example doing DMA mapping. Called from threaded | ||
| 281 | * context. | ||
| 282 | * @unprepare_message: undo any work done by prepare_message(). | ||
| 277 | * @cs_gpios: Array of GPIOs to use as chip select lines; one per CS | 283 | * @cs_gpios: Array of GPIOs to use as chip select lines; one per CS |
| 278 | * number. Any individual value may be -ENOENT for CS lines that | 284 | * number. Any individual value may be -ENOENT for CS lines that |
| 279 | * are not GPIOs (driven by the SPI controller itself). | 285 | * are not GPIOs (driven by the SPI controller itself). |
| @@ -388,11 +394,16 @@ struct spi_master { | |||
| 388 | bool running; | 394 | bool running; |
| 389 | bool rt; | 395 | bool rt; |
| 390 | bool auto_runtime_pm; | 396 | bool auto_runtime_pm; |
| 397 | bool cur_msg_prepared; | ||
| 391 | 398 | ||
| 392 | int (*prepare_transfer_hardware)(struct spi_master *master); | 399 | int (*prepare_transfer_hardware)(struct spi_master *master); |
| 393 | int (*transfer_one_message)(struct spi_master *master, | 400 | int (*transfer_one_message)(struct spi_master *master, |
| 394 | struct spi_message *mesg); | 401 | struct spi_message *mesg); |
| 395 | int (*unprepare_transfer_hardware)(struct spi_master *master); | 402 | int (*unprepare_transfer_hardware)(struct spi_master *master); |
| 403 | int (*prepare_message)(struct spi_master *master, | ||
| 404 | struct spi_message *message); | ||
| 405 | int (*unprepare_message)(struct spi_master *master, | ||
| 406 | struct spi_message *message); | ||
| 396 | 407 | ||
| 397 | /* gpio chip select */ | 408 | /* gpio chip select */ |
| 398 | int *cs_gpios; | 409 | int *cs_gpios; |
