Lines Matching refs:cli

162 	struct i2c_nmk_client		cli;  member
269 dev->cli.operation = I2C_NO_OPERATION; in init_hw()
290 mcr |= GEN_MASK(dev->cli.slave_adr, I2C_MCR_A7, 1); in load_i2c_mcr_reg()
296 if (dev->cli.operation == I2C_WRITE) in load_i2c_mcr_reg()
307 mcr |= GEN_MASK(dev->cli.count, I2C_MCR_LENGTH, 15); in load_i2c_mcr_reg()
580 dev->cli.slave_adr = msgs[i].addr; in nmk_i2c_xfer()
581 dev->cli.buffer = msgs[i].buf; in nmk_i2c_xfer()
582 dev->cli.count = msgs[i].len; in nmk_i2c_xfer()
588 dev->cli.operation = I2C_READ; in nmk_i2c_xfer()
592 dev->cli.operation = I2C_WRITE; in nmk_i2c_xfer()
662 if (dev->cli.operation == I2C_READ) { in i2c_irq_handler()
671 (dev->cli.count != 0); in i2c_irq_handler()
674 writeb(*dev->cli.buffer, in i2c_irq_handler()
676 dev->cli.buffer++; in i2c_irq_handler()
677 dev->cli.count--; in i2c_irq_handler()
678 dev->cli.xfer_bytes++; in i2c_irq_handler()
684 if (dev->cli.count == 0) in i2c_irq_handler()
699 *dev->cli.buffer = readb(dev->virtbase + I2C_RFR); in i2c_irq_handler()
700 dev->cli.buffer++; in i2c_irq_handler()
702 dev->cli.count -= rft; in i2c_irq_handler()
703 dev->cli.xfer_bytes += rft; in i2c_irq_handler()
709 *dev->cli.buffer = readb(dev->virtbase + I2C_RFR); in i2c_irq_handler()
710 dev->cli.buffer++; in i2c_irq_handler()
712 dev->cli.count -= MAX_I2C_FIFO_THRESHOLD; in i2c_irq_handler()
713 dev->cli.xfer_bytes += MAX_I2C_FIFO_THRESHOLD; in i2c_irq_handler()
719 if (dev->cli.operation == I2C_READ) { in i2c_irq_handler()
722 if (dev->cli.count == 0) in i2c_irq_handler()
724 *dev->cli.buffer = in i2c_irq_handler()
726 dev->cli.buffer++; in i2c_irq_handler()
727 dev->cli.count--; in i2c_irq_handler()
728 dev->cli.xfer_bytes++; in i2c_irq_handler()
740 if (dev->cli.count) { in i2c_irq_handler()
743 "xfered\n", dev->cli.count); in i2c_irq_handler()