mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Merge remote-tracking branch 'spi/topic/core' into spi-linus
This commit is contained in:
commit
3c1039745e
3 changed files with 34 additions and 28 deletions
|
@ -75,6 +75,7 @@ struct spi_device {
|
|||
struct spi_master *master;
|
||||
u32 max_speed_hz;
|
||||
u8 chip_select;
|
||||
u8 bits_per_word;
|
||||
u16 mode;
|
||||
#define SPI_CPHA 0x01 /* clock phase */
|
||||
#define SPI_CPOL 0x02 /* clock polarity */
|
||||
|
@ -92,7 +93,6 @@ struct spi_device {
|
|||
#define SPI_TX_QUAD 0x200 /* transmit with 4 wires */
|
||||
#define SPI_RX_DUAL 0x400 /* receive with 2 wires */
|
||||
#define SPI_RX_QUAD 0x800 /* receive with 4 wires */
|
||||
u8 bits_per_word;
|
||||
int irq;
|
||||
void *controller_state;
|
||||
void *controller_data;
|
||||
|
@ -578,8 +578,8 @@ struct spi_transfer {
|
|||
dma_addr_t rx_dma;
|
||||
|
||||
unsigned cs_change:1;
|
||||
u8 tx_nbits;
|
||||
u8 rx_nbits;
|
||||
unsigned tx_nbits:3;
|
||||
unsigned rx_nbits:3;
|
||||
#define SPI_NBITS_SINGLE 0x01 /* 1bit transfer */
|
||||
#define SPI_NBITS_DUAL 0x02 /* 2bits transfer */
|
||||
#define SPI_NBITS_QUAD 0x04 /* 4bits transfer */
|
||||
|
@ -849,7 +849,7 @@ static inline ssize_t spi_w8r16(struct spi_device *spi, u8 cmd)
|
|||
ssize_t status;
|
||||
u16 result;
|
||||
|
||||
status = spi_write_then_read(spi, &cmd, 1, (u8 *) &result, 2);
|
||||
status = spi_write_then_read(spi, &cmd, 1, &result, 2);
|
||||
|
||||
/* return negative errno or unsigned value */
|
||||
return (status < 0) ? status : result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue