greybus: spi: rename rdwr field to xfer_flags
As more bits will be added to the field, let's make the field more generic and name it accordingly. So, rename it from rdwr to xfer_flags. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
3b077247b6
commit
22e26a3a13
@ -876,7 +876,7 @@ struct gb_spi_transfer {
|
|||||||
__le16 delay_usecs;
|
__le16 delay_usecs;
|
||||||
__u8 cs_change;
|
__u8 cs_change;
|
||||||
__u8 bits_per_word;
|
__u8 bits_per_word;
|
||||||
__u8 rdwr;
|
__u8 xfer_flags;
|
||||||
#define GB_SPI_XFER_READ 0x01
|
#define GB_SPI_XFER_READ 0x01
|
||||||
#define GB_SPI_XFER_WRITE 0x02
|
#define GB_SPI_XFER_WRITE 0x02
|
||||||
} __packed;
|
} __packed;
|
||||||
|
@ -255,14 +255,14 @@ static struct gb_operation *gb_spi_operation_create(struct gb_spilib *spi,
|
|||||||
|
|
||||||
/* Copy tx data */
|
/* Copy tx data */
|
||||||
if (xfer->tx_buf) {
|
if (xfer->tx_buf) {
|
||||||
gb_xfer->rdwr |= GB_SPI_XFER_WRITE;
|
gb_xfer->xfer_flags |= GB_SPI_XFER_WRITE;
|
||||||
memcpy(tx_data, xfer->tx_buf + spi->tx_xfer_offset,
|
memcpy(tx_data, xfer->tx_buf + spi->tx_xfer_offset,
|
||||||
xfer_len);
|
xfer_len);
|
||||||
tx_data += xfer_len;
|
tx_data += xfer_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xfer->rx_buf)
|
if (xfer->rx_buf)
|
||||||
gb_xfer->rdwr |= GB_SPI_XFER_READ;
|
gb_xfer->xfer_flags |= GB_SPI_XFER_READ;
|
||||||
|
|
||||||
if (xfer == spi->last_xfer) {
|
if (xfer == spi->last_xfer) {
|
||||||
msg->state = GB_SPI_STATE_OP_DONE;
|
msg->state = GB_SPI_STATE_OP_DONE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user