Searched refs:buf_remaining (Results 1 - 1 of 1) sorted by relevance

/linux-4.4.14/drivers/i2c/busses/
H A Di2c-tegra.c275 size_t buf_remaining = i2c_dev->msg_buf_remaining; tegra_i2c_empty_rx_fifo() local
283 words_to_transfer = buf_remaining / BYTES_PER_FIFO_WORD; tegra_i2c_empty_rx_fifo()
290 buf_remaining -= words_to_transfer * BYTES_PER_FIFO_WORD; tegra_i2c_empty_rx_fifo()
297 if (rx_fifo_avail > 0 && buf_remaining > 0) { tegra_i2c_empty_rx_fifo()
298 BUG_ON(buf_remaining > 3); tegra_i2c_empty_rx_fifo()
301 memcpy(buf, &val, buf_remaining); tegra_i2c_empty_rx_fifo()
302 buf_remaining = 0; tegra_i2c_empty_rx_fifo()
306 BUG_ON(rx_fifo_avail > 0 && buf_remaining > 0); tegra_i2c_empty_rx_fifo()
307 i2c_dev->msg_buf_remaining = buf_remaining; tegra_i2c_empty_rx_fifo()
317 size_t buf_remaining = i2c_dev->msg_buf_remaining; tegra_i2c_fill_tx_fifo() local
325 words_to_transfer = buf_remaining / BYTES_PER_FIFO_WORD; tegra_i2c_fill_tx_fifo()
334 * to finish writing all bytes (AKA buf_remaining goes to 0) we tegra_i2c_fill_tx_fifo()
337 * buf_remaining as 0 and doesn't call us back re-entrantly. tegra_i2c_fill_tx_fifo()
339 buf_remaining -= words_to_transfer * BYTES_PER_FIFO_WORD; tegra_i2c_fill_tx_fifo()
341 i2c_dev->msg_buf_remaining = buf_remaining; tegra_i2c_fill_tx_fifo()
356 if (tx_fifo_avail > 0 && buf_remaining > 0) { tegra_i2c_fill_tx_fifo()
357 BUG_ON(buf_remaining > 3); tegra_i2c_fill_tx_fifo()
358 memcpy(&val, buf, buf_remaining); tegra_i2c_fill_tx_fifo()

Completed in 57 milliseconds