|
Lines 425-430
struct spi_master {
Link Here
|
| 425 |
#define SPI_MASTER_MUST_RX BIT(3) /* requires rx */ |
425 |
#define SPI_MASTER_MUST_RX BIT(3) /* requires rx */ |
| 426 |
#define SPI_MASTER_MUST_TX BIT(4) /* requires tx */ |
426 |
#define SPI_MASTER_MUST_TX BIT(4) /* requires tx */ |
| 427 |
|
427 |
|
|
|
428 |
/* |
| 429 |
* on some hardware transfer size may be constrained |
| 430 |
* the limit may depend on device transfer settings |
| 431 |
*/ |
| 432 |
size_t (*max_transfer_size)(struct spi_device *spi); |
| 433 |
|
| 428 |
/* lock and mutex for SPI bus locking */ |
434 |
/* lock and mutex for SPI bus locking */ |
| 429 |
spinlock_t bus_lock_spinlock; |
435 |
spinlock_t bus_lock_spinlock; |
| 430 |
struct mutex bus_lock_mutex; |
436 |
struct mutex bus_lock_mutex; |
|
Lines 832-837
extern int spi_async(struct spi_device *spi, struct spi_message *message);
Link Here
|
| 832 |
extern int spi_async_locked(struct spi_device *spi, |
838 |
extern int spi_async_locked(struct spi_device *spi, |
| 833 |
struct spi_message *message); |
839 |
struct spi_message *message); |
| 834 |
|
840 |
|
|
|
841 |
static inline size_t |
| 842 |
spi_max_transfer_size(struct spi_device *spi) |
| 843 |
{ |
| 844 |
struct spi_master *master = spi->master; |
| 845 |
if (!master->max_transfer_size) |
| 846 |
return SIZE_MAX; |
| 847 |
return master->max_transfer_size(spi); |
| 848 |
} |
| 849 |
|
| 835 |
/*---------------------------------------------------------------------------*/ |
850 |
/*---------------------------------------------------------------------------*/ |
| 836 |
|
851 |
|
| 837 |
/* All these synchronous SPI transfer routines are utilities layered |
852 |
/* All these synchronous SPI transfer routines are utilities layered |
| 838 |
- |
|
|