Lines Matching refs:rx
194 } rx; in dln2_spi_get_cs_num() local
195 unsigned rx_len = sizeof(rx); in dln2_spi_get_cs_num()
199 &rx, &rx_len); in dln2_spi_get_cs_num()
202 if (rx_len < sizeof(rx)) in dln2_spi_get_cs_num()
205 *cs_num = le16_to_cpu(rx.cs_count); in dln2_spi_get_cs_num()
220 } rx; in dln2_spi_get_speed() local
221 unsigned rx_len = sizeof(rx); in dln2_spi_get_speed()
225 ret = dln2_transfer(dln2->pdev, cmd, &tx, sizeof(tx), &rx, &rx_len); in dln2_spi_get_speed()
228 if (rx_len < sizeof(rx)) in dln2_spi_get_speed()
231 *freq = le32_to_cpu(rx.speed); in dln2_spi_get_speed()
270 } rx; in dln2_spi_set_speed() local
271 int rx_len = sizeof(rx); in dln2_spi_set_speed()
277 &rx, &rx_len); in dln2_spi_set_speed()
280 if (rx_len < sizeof(rx)) in dln2_spi_set_speed()
329 } *rx = dln2->buf; in dln2_spi_get_supported_frame_sizes() local
330 unsigned rx_len = sizeof(*rx); in dln2_spi_get_supported_frame_sizes()
336 &tx, sizeof(tx), rx, &rx_len); in dln2_spi_get_supported_frame_sizes()
339 if (rx_len < sizeof(*rx)) in dln2_spi_get_supported_frame_sizes()
341 if (rx->count > ARRAY_SIZE(rx->frame_sizes)) in dln2_spi_get_supported_frame_sizes()
345 for (i = 0; i < rx->count; i++) in dln2_spi_get_supported_frame_sizes()
346 *bpw_mask |= BIT(rx->frame_sizes[i] - 1); in dln2_spi_get_supported_frame_sizes()
462 } __packed *rx = dln2->buf; in dln2_spi_read_one() local
463 unsigned rx_len = sizeof(*rx); in dln2_spi_read_one()
465 BUILD_BUG_ON(sizeof(*rx) > DLN2_SPI_BUF_SIZE); in dln2_spi_read_one()
475 rx, &rx_len); in dln2_spi_read_one()
478 if (rx_len < sizeof(rx->size) + data_len) in dln2_spi_read_one()
480 if (le16_to_cpu(rx->size) != data_len) in dln2_spi_read_one()
483 dln2_spi_copy_from_buf(data, rx->buf, data_len, dln2->bpw); in dln2_spi_read_one()
504 } __packed *rx; in dln2_spi_read_write_one() local
508 sizeof(*rx) > DLN2_SPI_BUF_SIZE); in dln2_spi_read_write_one()
519 rx = dln2->buf; in dln2_spi_read_write_one()
528 rx_len = sizeof(*rx); in dln2_spi_read_write_one()
531 rx, &rx_len); in dln2_spi_read_write_one()
534 if (rx_len < sizeof(rx->size) + data_len) in dln2_spi_read_write_one()
536 if (le16_to_cpu(rx->size) != data_len) in dln2_spi_read_write_one()
539 dln2_spi_copy_from_buf(rx_data, rx->buf, data_len, dln2->bpw); in dln2_spi_read_write_one()