Lines Matching refs:msg
68 const struct i2c_msg *msg, int joined_rlen) in i2c_sendbytes() argument
77 msg->len, joined_rlen); in i2c_sendbytes()
79 dprintk(1, "%s(msg->len=%d)\n", __func__, msg->len); in i2c_sendbytes()
82 if (msg->len == 0) { in i2c_sendbytes()
83 cx_write(bus->reg_addr, msg->addr << 25); in i2c_sendbytes()
96 addr = (msg->addr << 25) | msg->buf[0]; in i2c_sendbytes()
97 wdata = msg->buf[0]; in i2c_sendbytes()
100 if (msg->len > 1) in i2c_sendbytes()
112 printk(KERN_DEBUG " <W %02x %02x", msg->addr << 1, msg->buf[0]); in i2c_sendbytes()
117 for (cnt = 1; cnt < msg->len; cnt++) { in i2c_sendbytes()
119 wdata = msg->buf[cnt]; in i2c_sendbytes()
122 if (cnt < msg->len - 1) in i2c_sendbytes()
134 pr_cont(" %02x", msg->buf[cnt]); in i2c_sendbytes()
139 return msg->len; in i2c_sendbytes()
149 const struct i2c_msg *msg, int joined) in i2c_readbytes() argument
158 dprintk(1, "%s(msg->len=%d)\n", __func__, msg->len); in i2c_readbytes()
161 if (msg->len == 0) { in i2c_readbytes()
162 cx_write(bus->reg_addr, msg->addr << 25); in i2c_readbytes()
178 dprintk(1, " <R %02x", (msg->addr << 1) + 1); in i2c_readbytes()
181 for (cnt = 0; cnt < msg->len; cnt++) { in i2c_readbytes()
185 if (cnt < msg->len - 1) in i2c_readbytes()
188 cx_write(bus->reg_addr, msg->addr << 25); in i2c_readbytes()
193 msg->buf[cnt] = cx_read(bus->reg_rdata) & 0xff; in i2c_readbytes()
195 dprintk(1, " %02x", msg->buf[cnt]); in i2c_readbytes()
200 return msg->len; in i2c_readbytes()
357 struct i2c_msg msg; in cx23885_av_clk() local
368 msg.addr = 0x44; in cx23885_av_clk()
369 msg.flags = I2C_M_TEN; in cx23885_av_clk()
370 msg.len = 3; in cx23885_av_clk()
371 msg.buf = buffer; in cx23885_av_clk()
373 i2c_xfer(&dev->i2c_bus[2].i2c_adap, &msg, 1); in cx23885_av_clk()