Lines Matching refs:buf_remaining
737 size_t buf_remaining = i2c_dev->msg_buf_remaining; in tegra_i2c_empty_rx_fifo() local
758 words_to_transfer = buf_remaining / BYTES_PER_FIFO_WORD; in tegra_i2c_empty_rx_fifo()
765 buf_remaining -= words_to_transfer * BYTES_PER_FIFO_WORD; in tegra_i2c_empty_rx_fifo()
772 if (rx_fifo_avail > 0 && buf_remaining > 0) { in tegra_i2c_empty_rx_fifo()
780 memcpy(buf, &val, buf_remaining); in tegra_i2c_empty_rx_fifo()
781 buf_remaining = 0; in tegra_i2c_empty_rx_fifo()
789 i2c_dev->msg_buf_remaining = buf_remaining; in tegra_i2c_empty_rx_fifo()
797 size_t buf_remaining = i2c_dev->msg_buf_remaining; in tegra_i2c_fill_tx_fifo() local
811 words_to_transfer = buf_remaining / BYTES_PER_FIFO_WORD; in tegra_i2c_fill_tx_fifo()
830 buf_remaining -= words_to_transfer * BYTES_PER_FIFO_WORD; in tegra_i2c_fill_tx_fifo()
833 i2c_dev->msg_buf_remaining = buf_remaining; in tegra_i2c_fill_tx_fifo()
849 if (tx_fifo_avail > 0 && buf_remaining > 0) { in tegra_i2c_fill_tx_fifo()
855 memcpy(&val, buf, buf_remaining); in tegra_i2c_fill_tx_fifo()