Lines Matching refs:pmsg
121 static int puv3_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *pmsg, in puv3_i2c_xfer() argument
133 writel(pmsg->addr, I2C_TAR); in puv3_i2c_xfer()
142 pmsg->flags & I2C_M_RD ? "read" : "writ", in puv3_i2c_xfer()
143 pmsg->len, pmsg->len > 1 ? "s" : "", in puv3_i2c_xfer()
144 pmsg->flags & I2C_M_RD ? "from" : "to", pmsg->addr); in puv3_i2c_xfer()
146 if (pmsg->len && pmsg->buf) { /* sanity check */ in puv3_i2c_xfer()
147 if (pmsg->flags & I2C_M_RD) in puv3_i2c_xfer()
148 ret = xfer_read(adap, pmsg->buf, pmsg->len); in puv3_i2c_xfer()
150 ret = xfer_write(adap, pmsg->buf, pmsg->len); in puv3_i2c_xfer()
157 pmsg++; /* next message */ in puv3_i2c_xfer()
161 if (pmsg->addr == I2C_TAR_PWIC) { in puv3_i2c_xfer()
162 swap = pmsg->buf[0]; in puv3_i2c_xfer()
163 pmsg->buf[0] = pmsg->buf[1]; in puv3_i2c_xfer()
164 pmsg->buf[1] = swap; in puv3_i2c_xfer()