Lines Matching refs:pmsg
143 struct i2c_msg *pmsg; in mtk_i2c_master_xfer() local
152 pmsg = &msgs[i]; in mtk_i2c_master_xfer()
165 if (pmsg->flags & I2C_M_TEN) { in mtk_i2c_master_xfer()
167 addr = 0xf0 | ((pmsg->addr >> 7) & 0x06); in mtk_i2c_master_xfer()
168 addr |= (pmsg->addr & 0xff) << 8; in mtk_i2c_master_xfer()
169 if (pmsg->flags & I2C_M_RD) in mtk_i2c_master_xfer()
177 addr = i2c_8bit_addr_from_msg(pmsg); in mtk_i2c_master_xfer()
185 if (!(pmsg->flags & I2C_M_IGNORE_NAK)) { in mtk_i2c_master_xfer()
192 for (len = pmsg->len, j = 0; len > 0; len -= 8, j += 8) { in mtk_i2c_master_xfer()
195 if (pmsg->flags & I2C_M_RD) { in mtk_i2c_master_xfer()
199 memcpy(data, &pmsg->buf[j], page_len); in mtk_i2c_master_xfer()
209 if (pmsg->flags & I2C_M_RD) { in mtk_i2c_master_xfer()
212 memcpy(&pmsg->buf[j], data, page_len); in mtk_i2c_master_xfer()
214 if (!(pmsg->flags & I2C_M_IGNORE_NAK)) { in mtk_i2c_master_xfer()