• Home
  • Raw
  • Download

Lines Matching refs:xfer

118 	struct nwl_dsi_transfer *xfer;  member
381 struct nwl_dsi_transfer *xfer = dsi->xfer; in nwl_dsi_read_packet() local
383 u8 *payload = xfer->msg->rx_buf; in nwl_dsi_read_packet()
389 xfer->status = 0; in nwl_dsi_read_packet()
391 if (xfer->rx_word_count == 0) { in nwl_dsi_read_packet()
398 xfer->status = err; in nwl_dsi_read_packet()
403 if (channel != xfer->msg->channel) { in nwl_dsi_read_packet()
406 xfer->cmd, channel, xfer->msg->channel); in nwl_dsi_read_packet()
407 xfer->status = -EINVAL; in nwl_dsi_read_packet()
414 if (xfer->msg->rx_len > 1) { in nwl_dsi_read_packet()
417 ++xfer->rx_len; in nwl_dsi_read_packet()
422 if (xfer->msg->rx_len > 0) { in nwl_dsi_read_packet()
425 ++xfer->rx_len; in nwl_dsi_read_packet()
427 xfer->status = xfer->rx_len; in nwl_dsi_read_packet()
432 xfer->cmd, word_count); in nwl_dsi_read_packet()
433 xfer->status = -EPROTO; in nwl_dsi_read_packet()
437 if (word_count > xfer->msg->rx_len) { in nwl_dsi_read_packet()
440 xfer->cmd, xfer->msg->rx_len, word_count); in nwl_dsi_read_packet()
441 xfer->status = -EINVAL; in nwl_dsi_read_packet()
445 xfer->rx_word_count = word_count; in nwl_dsi_read_packet()
448 word_count = xfer->rx_word_count; in nwl_dsi_read_packet()
463 xfer->rx_len += 4; in nwl_dsi_read_packet()
472 ++xfer->rx_len; in nwl_dsi_read_packet()
476 ++xfer->rx_len; in nwl_dsi_read_packet()
480 ++xfer->rx_len; in nwl_dsi_read_packet()
485 xfer->status = xfer->rx_len; in nwl_dsi_read_packet()
488 xfer->status = err; in nwl_dsi_read_packet()
495 struct nwl_dsi_transfer *xfer = dsi->xfer; in nwl_dsi_finish_transmission() local
498 if (!xfer) in nwl_dsi_finish_transmission()
501 if (xfer->direction == DSI_PACKET_SEND && in nwl_dsi_finish_transmission()
503 xfer->status = xfer->tx_len; in nwl_dsi_finish_transmission()
512 complete(&xfer->completed); in nwl_dsi_finish_transmission()
517 struct nwl_dsi_transfer *xfer = dsi->xfer; in nwl_dsi_begin_transmission() local
518 struct mipi_dsi_packet *pkt = &xfer->packet; in nwl_dsi_begin_transmission()
552 xfer->tx_len = pkt->payload_length; in nwl_dsi_begin_transmission()
564 xfer->cmd); in nwl_dsi_begin_transmission()
567 hs_mode = (xfer->msg->flags & MIPI_DSI_MSG_USE_LPM) ? 0 : 1; in nwl_dsi_begin_transmission()
569 val = NWL_DSI_WC(word_count) | NWL_DSI_TX_VC(xfer->msg->channel) | in nwl_dsi_begin_transmission()
570 NWL_DSI_TX_DT(xfer->msg->type) | NWL_DSI_HS_SEL(hs_mode) | in nwl_dsi_begin_transmission()
571 NWL_DSI_BTA_TX(xfer->need_bta); in nwl_dsi_begin_transmission()
582 struct nwl_dsi_transfer xfer; in nwl_dsi_host_transfer() local
586 dsi->xfer = &xfer; in nwl_dsi_host_transfer()
587 ret = mipi_dsi_create_packet(&xfer.packet, msg); in nwl_dsi_host_transfer()
589 dsi->xfer = NULL; in nwl_dsi_host_transfer()
598 xfer.direction = DSI_PACKET_RECEIVE; in nwl_dsi_host_transfer()
600 xfer.direction = DSI_PACKET_SEND; in nwl_dsi_host_transfer()
602 xfer.need_bta = (xfer.direction == DSI_PACKET_RECEIVE); in nwl_dsi_host_transfer()
603 xfer.need_bta |= (msg->flags & MIPI_DSI_MSG_REQ_ACK) ? 1 : 0; in nwl_dsi_host_transfer()
604 xfer.msg = msg; in nwl_dsi_host_transfer()
605 xfer.status = -ETIMEDOUT; in nwl_dsi_host_transfer()
606 xfer.rx_word_count = 0; in nwl_dsi_host_transfer()
607 xfer.rx_len = 0; in nwl_dsi_host_transfer()
608 xfer.cmd = 0x00; in nwl_dsi_host_transfer()
610 xfer.cmd = ((u8 *)(msg->tx_buf))[0]; in nwl_dsi_host_transfer()
611 init_completion(&xfer.completed); in nwl_dsi_host_transfer()
625 if (!wait_for_completion_timeout(&xfer.completed, in nwl_dsi_host_transfer()
628 xfer.cmd); in nwl_dsi_host_transfer()
631 ret = xfer.status; in nwl_dsi_host_transfer()