Lines Matching refs:cli

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