Lines Matching refs:cmd_buffer

49 	if (length > (sizeof(hdw->cmd_buffer) - 3)) {  in pvr2_i2c_write()
53 length,(unsigned int)(sizeof(hdw->cmd_buffer) - 3)); in pvr2_i2c_write()
60 memset(hdw->cmd_buffer, 0, sizeof(hdw->cmd_buffer)); in pvr2_i2c_write()
63 hdw->cmd_buffer[0] = FX2CMD_I2C_WRITE; /* write prefix */ in pvr2_i2c_write()
64 hdw->cmd_buffer[1] = i2c_addr; /* i2c addr of chip */ in pvr2_i2c_write()
65 hdw->cmd_buffer[2] = length; /* length of what follows */ in pvr2_i2c_write()
66 if (length) memcpy(hdw->cmd_buffer + 3, data, length); in pvr2_i2c_write()
70 hdw->cmd_buffer, in pvr2_i2c_write()
72 hdw->cmd_buffer, in pvr2_i2c_write()
75 if (hdw->cmd_buffer[0] != 8) { in pvr2_i2c_write()
77 if (hdw->cmd_buffer[0] != 7) { in pvr2_i2c_write()
79 i2c_addr,hdw->cmd_buffer[0]); in pvr2_i2c_write()
101 if (dlen > (sizeof(hdw->cmd_buffer) - 4)) { in pvr2_i2c_read()
105 dlen,(unsigned int)(sizeof(hdw->cmd_buffer) - 4)); in pvr2_i2c_read()
108 if (res && (rlen > (sizeof(hdw->cmd_buffer) - 1))) { in pvr2_i2c_read()
112 rlen,(unsigned int)(sizeof(hdw->cmd_buffer) - 1)); in pvr2_i2c_read()
119 memset(hdw->cmd_buffer, 0, sizeof(hdw->cmd_buffer)); in pvr2_i2c_read()
122 hdw->cmd_buffer[0] = FX2CMD_I2C_READ; /* read prefix */ in pvr2_i2c_read()
123 hdw->cmd_buffer[1] = dlen; /* arg length */ in pvr2_i2c_read()
124 hdw->cmd_buffer[2] = rlen; /* answer length. Device will send one in pvr2_i2c_read()
126 hdw->cmd_buffer[3] = i2c_addr; /* i2c addr of chip */ in pvr2_i2c_read()
127 if (dlen) memcpy(hdw->cmd_buffer + 4, data, dlen); in pvr2_i2c_read()
131 hdw->cmd_buffer, in pvr2_i2c_read()
133 hdw->cmd_buffer, in pvr2_i2c_read()
136 if (hdw->cmd_buffer[0] != 8) { in pvr2_i2c_read()
138 if (hdw->cmd_buffer[0] != 7) { in pvr2_i2c_read()
140 i2c_addr,hdw->cmd_buffer[0]); in pvr2_i2c_read()
151 memcpy(res, hdw->cmd_buffer + 1, rlen); in pvr2_i2c_read()
214 hdw->cmd_buffer[0] = FX2CMD_GET_IR_CODE; in i2c_24xxx_ir()
216 hdw->cmd_buffer,1, in i2c_24xxx_ir()
217 hdw->cmd_buffer,4); in i2c_24xxx_ir()
218 dat[0] = hdw->cmd_buffer[0]; in i2c_24xxx_ir()
219 dat[1] = hdw->cmd_buffer[1]; in i2c_24xxx_ir()
220 dat[2] = hdw->cmd_buffer[2]; in i2c_24xxx_ir()
221 dat[3] = hdw->cmd_buffer[3]; in i2c_24xxx_ir()
402 if (bcnt > sizeof(hdw->cmd_buffer)-1) { in pvr2_i2c_xfer()
403 bcnt = sizeof(hdw->cmd_buffer)-1; in pvr2_i2c_xfer()
442 if (bcnt > sizeof(hdw->cmd_buffer)-1) { in pvr2_i2c_xfer()
443 bcnt = sizeof(hdw->cmd_buffer)-1; in pvr2_i2c_xfer()