Lines Matching refs:pmsg
524 struct i2c_msg *pmsg;
530 pmsg = &msgs[i];
531 if(pmsg->flags & I2C_M_RD) {
533 ret = iic_readbytes(i2c_adap, pmsg->buf, pmsg->len, IIC_COMBINED_XFER);
535 else if(!(pmsg->flags & I2C_M_RD)) {
537 ret = iic_sendbytes(i2c_adap, pmsg->buf, pmsg->len, IIC_COMBINED_XFER);
541 pmsg = &msgs[i];
543 if(pmsg->flags & I2C_M_RD) {
545 ret = iic_readbytes(i2c_adap, pmsg->buf, pmsg->len, IIC_SINGLE_XFER);
547 else if(!(pmsg->flags & I2C_M_RD)) {
549 ret = iic_sendbytes(i2c_adap, pmsg->buf, pmsg->len, IIC_SINGLE_XFER);
635 struct i2c_msg *pmsg; in iic_xfer() local
639 pmsg = &msgs[i]; in iic_xfer()
641 if(!pmsg->len) { in iic_xfer()
645 if(!(pmsg->flags & I2C_M_RD) && (!(pmsg->len)%2) ) { in iic_xfer()
661 ret = iic_doAddress(adap, pmsg, i2c_adap->retries); in iic_xfer()
676 if(pmsg->flags & I2C_M_RD) /* Read */ in iic_xfer()
677 ret = iic_readbytes(i2c_adap, pmsg->buf, pmsg->len, 0); in iic_xfer()
680 ret = iic_sendbytes(i2c_adap, pmsg->buf, pmsg->len); in iic_xfer()
683 if (ret != pmsg->len) in iic_xfer()