Lines Matching defs:cli
161 * @cli: holder of client specific data.
178 struct i2c_nmk_client cli;
289 dev->cli.operation = I2C_NO_OPERATION;
308 mcr |= GEN_MASK(dev->cli.slave_adr, I2C_MCR_A7, 1);
319 slave_adr_3msb_bits = (dev->cli.slave_adr >> 7) & 0x7;
331 if (dev->cli.operation == I2C_WRITE)
342 mcr |= GEN_MASK(dev->cli.count, I2C_MCR_LENGTH, 15);
485 dev->cli.slave_adr);
497 (dev->cli.count != 0);
500 writeb(*dev->cli.buffer,
502 dev->cli.buffer++;
503 dev->cli.count--;
504 dev->cli.xfer_bytes++;
541 if (dev->cli.count != 0)
565 dev->cli.slave_adr);
583 dev->cli.operation = I2C_READ;
587 dev->cli.operation = I2C_WRITE;
680 dev->cli.slave_adr = msgs[i].addr;
681 dev->cli.buffer = msgs[i].buf;
682 dev->cli.count = msgs[i].len;
747 if (dev->cli.operation == I2C_READ) {
759 if (dev->cli.count == 0)
774 *dev->cli.buffer = readb(dev->virtbase + I2C_RFR);
775 dev->cli.buffer++;
777 dev->cli.count -= rft;
778 dev->cli.xfer_bytes += rft;
784 *dev->cli.buffer = readb(dev->virtbase + I2C_RFR);
785 dev->cli.buffer++;
787 dev->cli.count -= MAX_I2C_FIFO_THRESHOLD;
788 dev->cli.xfer_bytes += MAX_I2C_FIFO_THRESHOLD;
794 if (dev->cli.operation == I2C_READ) {
797 if (dev->cli.count == 0)
799 *dev->cli.buffer =
801 dev->cli.buffer++;
802 dev->cli.count--;
803 dev->cli.xfer_bytes++;
810 if (dev->cli.count) {
814 dev->cli.count);