Lines Matching refs:xs
269 static int xlp_spi_xfer_block(struct xlp_spi_priv *xs, in xlp_spi_xfer_block() argument
276 xs->tx_buf = tx_buf; in xlp_spi_xfer_block()
277 xs->rx_buf = rx_buf; in xlp_spi_xfer_block()
278 xs->tx_len = (xs->tx_buf == NULL) ? 0 : xfer_len; in xlp_spi_xfer_block()
279 xs->rx_len = (xs->rx_buf == NULL) ? 0 : xfer_len; in xlp_spi_xfer_block()
280 xs->txerrors = xs->rxerrors = 0; in xlp_spi_xfer_block()
283 if (xs->tx_len) in xlp_spi_xfer_block()
284 xlp_spi_fill_txfifo(xs); in xlp_spi_xfer_block()
286 xlp_spi_send_cmd(xs, xfer_len, cmd_cont); in xlp_spi_xfer_block()
293 if (xs->tx_len) in xlp_spi_xfer_block()
300 xlp_spi_reg_write(xs, xs->cs, XLP_SPI_INTR_EN, intr_mask); in xlp_spi_xfer_block()
302 timeout = wait_for_completion_timeout(&xs->done, in xlp_spi_xfer_block()
305 xlp_spi_reg_write(xs, xs->cs, XLP_SPI_INTR_EN, 0x0); in xlp_spi_xfer_block()
307 dev_err(&xs->dev, "xfer timedout!\n"); in xlp_spi_xfer_block()
310 if (xs->txerrors || xs->rxerrors) in xlp_spi_xfer_block()
311 dev_err(&xs->dev, "Over/Underflow rx %d tx %d xfer %d!\n", in xlp_spi_xfer_block()
312 xs->rxerrors, xs->txerrors, xfer_len); in xlp_spi_xfer_block()
319 static int xlp_spi_txrx_bufs(struct xlp_spi_priv *xs, struct spi_transfer *t) in xlp_spi_txrx_bufs() argument
330 sz = xlp_spi_xfer_block(xs, tx_buf, rx_buf, in xlp_spi_txrx_bufs()
333 sz = xlp_spi_xfer_block(xs, tx_buf, rx_buf, in xlp_spi_txrx_bufs()
334 bytesleft, xs->cmd_cont); in xlp_spi_txrx_bufs()