diff options
Diffstat (limited to 'include/linux/spi/spi.h')
| -rw-r--r-- | include/linux/spi/spi.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index af56071b06f9..ae0a5286f558 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -262,6 +262,13 @@ struct spi_master { | |||
| 262 | #define SPI_MASTER_NO_RX BIT(1) /* can't do buffer read */ | 262 | #define SPI_MASTER_NO_RX BIT(1) /* can't do buffer read */ |
| 263 | #define SPI_MASTER_NO_TX BIT(2) /* can't do buffer write */ | 263 | #define SPI_MASTER_NO_TX BIT(2) /* can't do buffer write */ |
| 264 | 264 | ||
| 265 | /* lock and mutex for SPI bus locking */ | ||
| 266 | spinlock_t bus_lock_spinlock; | ||
| 267 | struct mutex bus_lock_mutex; | ||
| 268 | |||
| 269 | /* flag indicating that the SPI bus is locked for exclusive use */ | ||
| 270 | bool bus_lock_flag; | ||
| 271 | |||
| 265 | /* Setup mode and clock, etc (spi driver may call many times). | 272 | /* Setup mode and clock, etc (spi driver may call many times). |
| 266 | * | 273 | * |
| 267 | * IMPORTANT: this may be called when transfers to another | 274 | * IMPORTANT: this may be called when transfers to another |
| @@ -542,6 +549,8 @@ static inline void spi_message_free(struct spi_message *m) | |||
| 542 | 549 | ||
| 543 | extern int spi_setup(struct spi_device *spi); | 550 | extern int spi_setup(struct spi_device *spi); |
| 544 | extern int spi_async(struct spi_device *spi, struct spi_message *message); | 551 | extern int spi_async(struct spi_device *spi, struct spi_message *message); |
| 552 | extern int spi_async_locked(struct spi_device *spi, | ||
| 553 | struct spi_message *message); | ||
| 545 | 554 | ||
| 546 | /*---------------------------------------------------------------------------*/ | 555 | /*---------------------------------------------------------------------------*/ |
| 547 | 556 | ||
| @@ -551,6 +560,9 @@ extern int spi_async(struct spi_device *spi, struct spi_message *message); | |||
| 551 | */ | 560 | */ |
| 552 | 561 | ||
| 553 | extern int spi_sync(struct spi_device *spi, struct spi_message *message); | 562 | extern int spi_sync(struct spi_device *spi, struct spi_message *message); |
| 563 | extern int spi_sync_locked(struct spi_device *spi, struct spi_message *message); | ||
| 564 | extern int spi_bus_lock(struct spi_master *master); | ||
| 565 | extern int spi_bus_unlock(struct spi_master *master); | ||
| 554 | 566 | ||
| 555 | /** | 567 | /** |
| 556 | * spi_write - SPI synchronous write | 568 | * spi_write - SPI synchronous write |
