Please refer to API:
spi_setup_xfer(&spi->dev, &test_xfer, len, 1);
spi_message_add_tail(&test_xfer, &msg);
ret = spi_sync(spi, &msg);
Please refer to API:
spi_setup_xfer(&spi->dev, &test_xfer, len, 1);
spi_message_add_tail(&test_xfer, &msg);
ret = spi_sync(spi, &msg);