Home
last modified time | relevance | path

Searched refs:xfer (Results 1 – 25 of 217) sorted by relevance

123456789

/kernel/linux/linux-5.10/drivers/firmware/arm_scmi/
Ddriver.c159 struct scmi_xfer *xfer; in scmi_xfer_get() local
176 xfer = &minfo->xfer_block[xfer_id]; in scmi_xfer_get()
177 xfer->hdr.seq = xfer_id; in scmi_xfer_get()
178 reinit_completion(&xfer->done); in scmi_xfer_get()
179 xfer->transfer_id = atomic_inc_return(&transfer_last_id); in scmi_xfer_get()
181 return xfer; in scmi_xfer_get()
193 __scmi_xfer_put(struct scmi_xfers_info *minfo, struct scmi_xfer *xfer) in __scmi_xfer_put() argument
203 clear_bit(xfer->hdr.seq, minfo->xfer_alloc_table); in __scmi_xfer_put()
209 struct scmi_xfer *xfer; in scmi_handle_notification() local
216 xfer = scmi_xfer_get(cinfo->handle, minfo); in scmi_handle_notification()
[all …]
Dshmem.c33 struct scmi_xfer *xfer) in shmem_tx_prepare() argument
45 iowrite32(xfer->hdr.poll_completion ? 0 : SCMI_SHMEM_FLAG_INTR_ENABLED, in shmem_tx_prepare()
47 iowrite32(sizeof(shmem->msg_header) + xfer->tx.len, &shmem->length); in shmem_tx_prepare()
48 iowrite32(pack_scmi_header(&xfer->hdr), &shmem->msg_header); in shmem_tx_prepare()
49 if (xfer->tx.buf) in shmem_tx_prepare()
50 memcpy_toio(shmem->msg_payload, xfer->tx.buf, xfer->tx.len); in shmem_tx_prepare()
59 struct scmi_xfer *xfer) in shmem_fetch_response() argument
61 xfer->hdr.status = ioread32(shmem->msg_payload); in shmem_fetch_response()
63 xfer->rx.len = min_t(size_t, xfer->rx.len, in shmem_fetch_response()
67 memcpy_fromio(xfer->rx.buf, shmem->msg_payload + 4, xfer->rx.len); in shmem_fetch_response()
[all …]
/kernel/linux/linux-5.10/include/trace/events/
Dspi.h117 #define spi_valid_txbuf(msg, xfer) \ argument
118 (xfer->tx_buf && xfer->tx_buf != msg->spi->controller->dummy_tx)
119 #define spi_valid_rxbuf(msg, xfer) \ argument
120 (xfer->rx_buf && xfer->rx_buf != msg->spi->controller->dummy_rx)
124 TP_PROTO(struct spi_message *msg, struct spi_transfer *xfer),
126 TP_ARGS(msg, xfer),
131 __field( struct spi_transfer *, xfer )
134 spi_valid_rxbuf(msg, xfer) ?
135 (xfer->len < 64 ? xfer->len : 64) : 0)
137 spi_valid_txbuf(msg, xfer) ?
[all …]
/kernel/linux/linux-5.10/drivers/spi/
Dspi-atmel.c417 static inline bool atmel_spi_is_vmalloc_xfer(struct spi_transfer *xfer) in atmel_spi_is_vmalloc_xfer() argument
419 return is_vmalloc_addr(xfer->tx_buf) || is_vmalloc_addr(xfer->rx_buf); in atmel_spi_is_vmalloc_xfer()
423 struct spi_transfer *xfer) in atmel_spi_use_dma() argument
425 return as->use_dma && xfer->len >= DMA_MIN_BYTES; in atmel_spi_use_dma()
430 struct spi_transfer *xfer) in atmel_spi_can_dma() argument
435 return atmel_spi_use_dma(as, xfer) && in atmel_spi_can_dma()
436 !atmel_spi_is_vmalloc_xfer(xfer); in atmel_spi_can_dma()
438 return atmel_spi_use_dma(as, xfer); in atmel_spi_can_dma()
589 struct spi_transfer *xfer) in atmel_spi_next_xfer_single() argument
592 unsigned long xfer_pos = xfer->len - as->current_remaining_bytes; in atmel_spi_next_xfer_single()
[all …]
Dspi-qcom-qspi.c143 struct qspi_xfer xfer; member
171 const struct qspi_xfer *xfer; in qcom_qspi_pio_xfer_cfg() local
173 xfer = &ctrl->xfer; in qcom_qspi_pio_xfer_cfg()
176 pio_xfer_cfg |= xfer->dir; in qcom_qspi_pio_xfer_cfg()
177 if (xfer->is_last) in qcom_qspi_pio_xfer_cfg()
182 pio_xfer_cfg |= qspi_buswidth_to_iomode(ctrl, xfer->buswidth); in qcom_qspi_pio_xfer_cfg()
193 pio_xfer_ctrl |= ctrl->xfer.rem_bytes; in qcom_qspi_pio_xfer_ctrl()
207 if (ctrl->xfer.dir == QSPI_WRITE) in qcom_qspi_pio_xfer()
225 ctrl->xfer.rem_bytes = 0; in qcom_qspi_handle_err()
263 struct spi_transfer *xfer) in qcom_qspi_transfer_one() argument
[all …]
Dspi-slave-mt27xx.c147 struct spi_transfer *xfer) in mtk_spi_slave_fifo_transfer() argument
155 if (xfer->rx_buf) in mtk_spi_slave_fifo_transfer()
157 if (xfer->tx_buf) in mtk_spi_slave_fifo_transfer()
161 cnt = xfer->len / 4; in mtk_spi_slave_fifo_transfer()
162 if (xfer->tx_buf) in mtk_spi_slave_fifo_transfer()
164 xfer->tx_buf, cnt); in mtk_spi_slave_fifo_transfer()
166 remainder = xfer->len % 4; in mtk_spi_slave_fifo_transfer()
167 if (xfer->tx_buf && remainder > 0) { in mtk_spi_slave_fifo_transfer()
169 memcpy(&reg_val, xfer->tx_buf + cnt * 4, remainder); in mtk_spi_slave_fifo_transfer()
184 struct spi_transfer *xfer) in mtk_spi_slave_dma_transfer() argument
[all …]
Dspi-axi-spi-engine.c131 struct spi_device *spi, struct spi_transfer *xfer) in spi_engine_get_clk_div() argument
136 xfer->speed_hz * 2); in spi_engine_get_clk_div()
146 struct spi_transfer *xfer) in spi_engine_gen_xfer() argument
148 unsigned int len = xfer->len; in spi_engine_gen_xfer()
154 if (xfer->tx_buf) in spi_engine_gen_xfer()
156 if (xfer->rx_buf) in spi_engine_gen_xfer()
167 struct spi_transfer *xfer) in spi_engine_gen_sleep() argument
173 if (xfer->delay_usecs) { in spi_engine_gen_sleep()
174 delay = xfer->delay_usecs; in spi_engine_gen_sleep()
176 delay = spi_delay_to_ns(&xfer->delay, xfer); in spi_engine_gen_sleep()
[all …]
Dspi.c289 struct spi_transfer *xfer, in spi_statistics_add_transfer_stats() argument
293 int l2len = min(fls(xfer->len), SPI_STATISTICS_HISTO_SIZE) - 1; in spi_statistics_add_transfer_stats()
303 stats->bytes += xfer->len; in spi_statistics_add_transfer_stats()
304 if ((xfer->tx_buf) && in spi_statistics_add_transfer_stats()
305 (xfer->tx_buf != ctlr->dummy_tx)) in spi_statistics_add_transfer_stats()
306 stats->bytes_tx += xfer->len; in spi_statistics_add_transfer_stats()
307 if ((xfer->rx_buf) && in spi_statistics_add_transfer_stats()
308 (xfer->rx_buf != ctlr->dummy_rx)) in spi_statistics_add_transfer_stats()
309 stats->bytes_rx += xfer->len; in spi_statistics_add_transfer_stats()
957 struct spi_transfer *xfer; in __spi_map_msg() local
[all …]
Dspi-rockchip.c344 struct spi_transfer *xfer) in rockchip_spi_prepare_irq() argument
346 rs->tx = xfer->tx_buf; in rockchip_spi_prepare_irq()
347 rs->rx = xfer->rx_buf; in rockchip_spi_prepare_irq()
348 rs->tx_left = rs->tx ? xfer->len / rs->n_bytes : 0; in rockchip_spi_prepare_irq()
349 rs->rx_left = xfer->len / rs->n_bytes; in rockchip_spi_prepare_irq()
404 struct spi_controller *ctlr, struct spi_transfer *xfer) in rockchip_spi_prepare_dma() argument
411 if (xfer->rx_buf) { in rockchip_spi_prepare_dma()
416 .src_maxburst = rockchip_spi_calc_burst_size(xfer->len / in rockchip_spi_prepare_dma()
424 xfer->rx_sg.sgl, xfer->rx_sg.nents, in rockchip_spi_prepare_dma()
434 if (xfer->tx_buf) { in rockchip_spi_prepare_dma()
[all …]
/kernel/linux/linux-5.10/drivers/firmware/
Dti_sci.c249 struct ti_sci_xfer *xfer; in ti_sci_rx_callback() local
263 xfer = &minfo->xfer_block[xfer_id]; in ti_sci_rx_callback()
272 if (mbox_msg->len < xfer->rx_len) { in ti_sci_rx_callback()
274 mbox_msg->len, xfer->rx_len); in ti_sci_rx_callback()
281 memcpy(xfer->xfer_buf, mbox_msg->buf, xfer->rx_len); in ti_sci_rx_callback()
282 complete(&xfer->done); in ti_sci_rx_callback()
308 struct ti_sci_xfer *xfer; in ti_sci_get_one_xfer() local
348 xfer = &minfo->xfer_block[xfer_id]; in ti_sci_get_one_xfer()
350 hdr = (struct ti_sci_msg_hdr *)xfer->tx_message.buf; in ti_sci_get_one_xfer()
351 xfer->tx_message.len = tx_message_size; in ti_sci_get_one_xfer()
[all …]
/kernel/linux/linux-5.10/drivers/iio/imu/
Dadis_buffer.c36 adis->xfer = kcalloc(2, sizeof(*adis->xfer), GFP_KERNEL); in adis_update_scan_mode_burst()
37 if (!adis->xfer) in adis_update_scan_mode_burst()
42 kfree(adis->xfer); in adis_update_scan_mode_burst()
43 adis->xfer = NULL; in adis_update_scan_mode_burst()
51 adis->xfer[0].tx_buf = tx; in adis_update_scan_mode_burst()
52 adis->xfer[0].bits_per_word = 8; in adis_update_scan_mode_burst()
53 adis->xfer[0].len = 2; in adis_update_scan_mode_burst()
54 adis->xfer[1].rx_buf = adis->buffer; in adis_update_scan_mode_burst()
55 adis->xfer[1].bits_per_word = 8; in adis_update_scan_mode_burst()
56 adis->xfer[1].len = burst_length; in adis_update_scan_mode_burst()
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/via/
Dvia_dmablit.c99 const drm_via_dmablit_t *xfer, in via_map_blit_for_device() argument
105 unsigned char *mem_addr = xfer->mem_addr; in via_map_blit_for_device()
108 uint32_t fb_addr = xfer->fb_addr; in via_map_blit_for_device()
120 for (cur_line = 0; cur_line < xfer->num_lines; ++cur_line) { in via_map_blit_for_device()
122 line_len = xfer->line_length; in via_map_blit_for_device()
156 mem_addr += xfer->mem_stride; in via_map_blit_for_device()
157 fb_addr += xfer->fb_stride; in via_map_blit_for_device()
232 via_lock_all_dma_pages(drm_via_sg_info_t *vsg, drm_via_dmablit_t *xfer) in via_lock_all_dma_pages() argument
235 unsigned long first_pfn = VIA_PFN(xfer->mem_addr); in via_lock_all_dma_pages()
236 vsg->num_pages = VIA_PFN(xfer->mem_addr + (xfer->num_lines * xfer->mem_stride - 1)) - in via_lock_all_dma_pages()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/micrel/
Dks8851_spi.c122 struct spi_transfer *xfer = &kss->spi_xfer1; in ks8851_wrreg16_spi() local
130 xfer->tx_buf = txb; in ks8851_wrreg16_spi()
131 xfer->rx_buf = NULL; in ks8851_wrreg16_spi()
132 xfer->len = 4; in ks8851_wrreg16_spi()
153 struct spi_transfer *xfer; in ks8851_rdreg() local
163 xfer = kss->spi_xfer2; in ks8851_rdreg()
165 xfer->tx_buf = txb; in ks8851_rdreg()
166 xfer->rx_buf = NULL; in ks8851_rdreg()
167 xfer->len = 2; in ks8851_rdreg()
169 xfer++; in ks8851_rdreg()
[all …]
/kernel/linux/linux-5.10/drivers/staging/greybus/
Dspilib.c151 static struct spi_transfer *get_next_xfer(struct spi_transfer *xfer, in get_next_xfer() argument
154 if (xfer == list_last_entry(&msg->transfers, struct spi_transfer, in get_next_xfer()
158 return list_next_entry(xfer, transfer_list); in get_next_xfer()
167 struct spi_transfer *xfer; in gb_spi_operation_create() local
178 xfer = spi->first_xfer; in gb_spi_operation_create()
184 spi->last_xfer = xfer; in gb_spi_operation_create()
186 if (!xfer->tx_buf && !xfer->rx_buf) { in gb_spi_operation_create()
188 "bufferless transfer, length %u\n", xfer->len); in gb_spi_operation_create()
196 if (xfer->tx_buf) { in gb_spi_operation_create()
197 len = xfer->len - spi->tx_xfer_offset; in gb_spi_operation_create()
[all …]
/kernel/linux/linux-5.10/drivers/i3c/master/
Ddw-i3c-master.c360 struct dw_i3c_xfer *xfer; in dw_i3c_master_alloc_xfer() local
362 xfer = kzalloc(struct_size(xfer, cmds, ncmds), GFP_KERNEL); in dw_i3c_master_alloc_xfer()
363 if (!xfer) in dw_i3c_master_alloc_xfer()
366 INIT_LIST_HEAD(&xfer->node); in dw_i3c_master_alloc_xfer()
367 xfer->ncmds = ncmds; in dw_i3c_master_alloc_xfer()
368 xfer->ret = -ETIMEDOUT; in dw_i3c_master_alloc_xfer()
370 return xfer; in dw_i3c_master_alloc_xfer()
373 static void dw_i3c_master_free_xfer(struct dw_i3c_xfer *xfer) in dw_i3c_master_free_xfer() argument
375 kfree(xfer); in dw_i3c_master_free_xfer()
380 struct dw_i3c_xfer *xfer = master->xferqueue.cur; in dw_i3c_master_start_xfer_locked() local
[all …]
/kernel/linux/linux-5.10/drivers/i2c/busses/
Di2c-mlxcpld.c87 struct mlxcpld_i2c_curr_xfer xfer; member
230 priv->xfer.msg = msgs; in mlxcpld_i2c_set_transf_data()
231 priv->xfer.msg_num = num; in mlxcpld_i2c_set_transf_data()
239 priv->xfer.cmd = msgs[num - 1].flags & I2C_M_RD; in mlxcpld_i2c_set_transf_data()
241 if (priv->xfer.cmd == I2C_M_RD && comm_len != msgs[0].len) { in mlxcpld_i2c_set_transf_data()
242 priv->xfer.addr_width = msgs[0].len; in mlxcpld_i2c_set_transf_data()
243 priv->xfer.data_len = comm_len - priv->xfer.addr_width; in mlxcpld_i2c_set_transf_data()
245 priv->xfer.addr_width = 0; in mlxcpld_i2c_set_transf_data()
246 priv->xfer.data_len = comm_len; in mlxcpld_i2c_set_transf_data()
316 if (priv->xfer.cmd != I2C_M_RD) in mlxcpld_i2c_wait_for_tc()
[all …]
/kernel/linux/linux-5.10/drivers/net/can/spi/mcp251xfd/
Dmcp251xfd-regmap.c31 struct spi_transfer xfer[] = { in mcp251xfd_regmap_nocrc_gather_write() local
47 return spi_sync_transfer(spi, xfer, ARRAY_SIZE(xfer)); in mcp251xfd_regmap_nocrc_gather_write()
96 struct spi_transfer xfer[2] = { }; in mcp251xfd_regmap_nocrc_update_bits() local
100 spi_message_add_tail(&xfer[0], &msg); in mcp251xfd_regmap_nocrc_update_bits()
103 xfer[0].tx_buf = buf_tx; in mcp251xfd_regmap_nocrc_update_bits()
104 xfer[0].len = sizeof(buf_tx->cmd); in mcp251xfd_regmap_nocrc_update_bits()
106 xfer[1].rx_buf = buf_rx->data; in mcp251xfd_regmap_nocrc_update_bits()
107 xfer[1].len = len; in mcp251xfd_regmap_nocrc_update_bits()
108 spi_message_add_tail(&xfer[1], &msg); in mcp251xfd_regmap_nocrc_update_bits()
110 xfer[0].tx_buf = buf_tx; in mcp251xfd_regmap_nocrc_update_bits()
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/bridge/
Dnwl-dsi.c118 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()
[all …]
/kernel/linux/linux-5.10/drivers/input/touchscreen/
Dcyttsp_spi.c38 struct spi_transfer xfer[2]; in cyttsp_spi_xfer() local
60 memset(xfer, 0, sizeof(xfer)); in cyttsp_spi_xfer()
67 xfer[0].tx_buf = wr_buf; in cyttsp_spi_xfer()
68 xfer[0].rx_buf = rd_buf; in cyttsp_spi_xfer()
71 xfer[0].len = length + CY_SPI_CMD_BYTES; in cyttsp_spi_xfer()
72 spi_message_add_tail(&xfer[0], &msg); in cyttsp_spi_xfer()
76 xfer[0].len = CY_SPI_CMD_BYTES; in cyttsp_spi_xfer()
77 spi_message_add_tail(&xfer[0], &msg); in cyttsp_spi_xfer()
79 xfer[1].rx_buf = buf; in cyttsp_spi_xfer()
80 xfer[1].len = length; in cyttsp_spi_xfer()
[all …]
Dad7877.c147 struct spi_transfer xfer[6]; member
177 struct spi_transfer xfer[AD7877_NR_SENSE + 2]; member
212 req->xfer[0].tx_buf = &req->command; in ad7877_read()
213 req->xfer[0].len = 2; in ad7877_read()
214 req->xfer[0].cs_change = 1; in ad7877_read()
216 req->xfer[1].rx_buf = &req->sample; in ad7877_read()
217 req->xfer[1].len = 2; in ad7877_read()
219 spi_message_add_tail(&req->xfer[0], &req->msg); in ad7877_read()
220 spi_message_add_tail(&req->xfer[1], &req->msg); in ad7877_read()
242 req->xfer[0].tx_buf = &req->command; in ad7877_write()
[all …]
Dcyttsp4_spi.c41 struct spi_transfer xfer[2]; in cyttsp_spi_xfer() local
63 memset(xfer, 0, sizeof(xfer)); in cyttsp_spi_xfer()
70 xfer[0].tx_buf = wr_buf; in cyttsp_spi_xfer()
71 xfer[0].rx_buf = rd_buf; in cyttsp_spi_xfer()
74 xfer[0].len = length + CY_SPI_CMD_BYTES; in cyttsp_spi_xfer()
75 spi_message_add_tail(&xfer[0], &msg); in cyttsp_spi_xfer()
79 xfer[0].len = CY_SPI_RD_HEADER_BYTES; in cyttsp_spi_xfer()
80 spi_message_add_tail(&xfer[0], &msg); in cyttsp_spi_xfer()
82 xfer[1].rx_buf = buf; in cyttsp_spi_xfer()
83 xfer[1].len = length; in cyttsp_spi_xfer()
[all …]
/kernel/linux/linux-5.10/drivers/dma/dw-edma/
Ddw-edma-core.c323 dw_edma_device_transfer(struct dw_edma_transfer *xfer) in dw_edma_device_transfer() argument
325 struct dw_edma_chan *chan = dchan2dw_edma_chan(xfer->dchan); in dw_edma_device_transfer()
326 enum dma_transfer_direction dir = xfer->direction; in dw_edma_device_transfer()
355 if (xfer->cyclic) { in dw_edma_device_transfer()
356 if (!xfer->xfer.cyclic.len || !xfer->xfer.cyclic.cnt) in dw_edma_device_transfer()
359 if (xfer->xfer.sg.len < 1) in dw_edma_device_transfer()
374 if (xfer->cyclic) { in dw_edma_device_transfer()
375 cnt = xfer->xfer.cyclic.cnt; in dw_edma_device_transfer()
377 cnt = xfer->xfer.sg.len; in dw_edma_device_transfer()
378 sg = xfer->xfer.sg.sgl; in dw_edma_device_transfer()
[all …]
/kernel/linux/linux-5.10/sound/soc/codecs/
Drl6347a.c62 struct i2c_msg xfer[2]; in rl6347a_hw_read() local
83 xfer[0].addr = client->addr; in rl6347a_hw_read()
84 xfer[0].flags = 0; in rl6347a_hw_read()
85 xfer[0].len = 4; in rl6347a_hw_read()
86 xfer[0].buf = (u8 *)&be_reg; in rl6347a_hw_read()
89 xfer[1].addr = client->addr; in rl6347a_hw_read()
90 xfer[1].flags = I2C_M_RD; in rl6347a_hw_read()
91 xfer[1].len = 4; in rl6347a_hw_read()
92 xfer[1].buf = (u8 *)&buf; in rl6347a_hw_read()
94 ret = i2c_transfer(client->adapter, xfer, 2); in rl6347a_hw_read()
/kernel/linux/linux-5.10/drivers/gpu/drm/exynos/
Dexynos_drm_dsi.c961 struct exynos_dsi_transfer *xfer) in exynos_dsi_send_to_fifo() argument
964 struct mipi_dsi_packet *pkt = &xfer->packet; in exynos_dsi_send_to_fifo()
965 const u8 *payload = pkt->payload + xfer->tx_done; in exynos_dsi_send_to_fifo()
966 u16 length = pkt->payload_length - xfer->tx_done; in exynos_dsi_send_to_fifo()
967 bool first = !xfer->tx_done; in exynos_dsi_send_to_fifo()
971 xfer, length, xfer->tx_done, xfer->rx_len, xfer->rx_done); in exynos_dsi_send_to_fifo()
976 xfer->tx_done += length; in exynos_dsi_send_to_fifo()
1010 if (NEQV(xfer->flags & MIPI_DSI_MSG_USE_LPM, in exynos_dsi_send_to_fifo()
1012 exynos_dsi_set_cmd_lpm(dsi, xfer->flags & MIPI_DSI_MSG_USE_LPM); in exynos_dsi_send_to_fifo()
1018 if (xfer->flags & MIPI_DSI_MSG_REQ_ACK) in exynos_dsi_send_to_fifo()
[all …]
/kernel/linux/linux-5.10/drivers/mfd/
Dtps6507x.c41 struct i2c_msg xfer[2]; in tps6507x_i2c_read_device() local
45 xfer[0].addr = i2c->addr; in tps6507x_i2c_read_device()
46 xfer[0].flags = 0; in tps6507x_i2c_read_device()
47 xfer[0].len = 1; in tps6507x_i2c_read_device()
48 xfer[0].buf = &reg; in tps6507x_i2c_read_device()
51 xfer[1].addr = i2c->addr; in tps6507x_i2c_read_device()
52 xfer[1].flags = I2C_M_RD; in tps6507x_i2c_read_device()
53 xfer[1].len = bytes; in tps6507x_i2c_read_device()
54 xfer[1].buf = dest; in tps6507x_i2c_read_device()
56 ret = i2c_transfer(i2c->adapter, xfer, 2); in tps6507x_i2c_read_device()

123456789