Lines Matching refs:msg
139 bttv_i2c_sendbytes(struct bttv *btv, const struct i2c_msg *msg, int last) in bttv_i2c_sendbytes() argument
145 if (0 == msg->len) in bttv_i2c_sendbytes()
149 xmit = (msg->addr << 25) | (msg->buf[0] << 16) | I2C_HW; in bttv_i2c_sendbytes()
150 if (msg->len > 1 || !last) in bttv_i2c_sendbytes()
159 pr_cont(" <W %02x %02x", msg->addr << 1, msg->buf[0]); in bttv_i2c_sendbytes()
162 for (cnt = 1; cnt < msg->len; cnt++ ) { in bttv_i2c_sendbytes()
164 xmit = (msg->buf[cnt] << 24) | I2C_HW | BT878_I2C_NOSTART; in bttv_i2c_sendbytes()
165 if (cnt < msg->len-1 || !last) in bttv_i2c_sendbytes()
174 pr_cont(" %02x", msg->buf[cnt]); in bttv_i2c_sendbytes()
178 return msg->len; in bttv_i2c_sendbytes()
189 bttv_i2c_readbytes(struct bttv *btv, const struct i2c_msg *msg, int last) in bttv_i2c_readbytes() argument
195 for (cnt = 0; cnt < msg->len; cnt++) { in bttv_i2c_readbytes()
196 xmit = (msg->addr << 25) | (1 << 24) | I2C_HW; in bttv_i2c_readbytes()
197 if (cnt < msg->len-1) in bttv_i2c_readbytes()
199 if (cnt < msg->len-1 || !last) in bttv_i2c_readbytes()
206 pr_cont(" <R %02x", (msg->addr << 1) +1); in bttv_i2c_readbytes()
215 msg->buf[cnt] = ((u32)btread(BT848_I2C) >> 8) & 0xff; in bttv_i2c_readbytes()
217 pr_cont(" =%02x", msg->buf[cnt]); in bttv_i2c_readbytes()
224 return msg->len; in bttv_i2c_readbytes()