Lines Matching refs:txbuf
93 u8 txbuf[64];
156 memset(mcp->txbuf, 0, 8);
157 mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
159 return mcp_send_data_req_status(mcp, mcp->txbuf, 8);
165 memset(mcp->txbuf, 0, 8);
166 mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
167 mcp->txbuf[2] = MCP2221_I2C_CANCEL;
169 return mcp_send_data_req_status(mcp, mcp->txbuf, 8);
176 memset(mcp->txbuf, 0, 8);
177 mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
178 mcp->txbuf[3] = MCP2221_I2C_SET_SPEED;
179 mcp->txbuf[4] = mcp->cur_i2c_clk_div;
181 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 8);
212 mcp->txbuf[0] = type;
213 mcp->txbuf[1] = msg->len & 0xff;
214 mcp->txbuf[2] = msg->len >> 8;
215 mcp->txbuf[3] = (u8)(msg->addr << 1);
217 memcpy(&mcp->txbuf[4], &msg->buf[idx], len);
219 ret = mcp_send_data_req_status(mcp, mcp->txbuf, len + 4);
264 mcp->txbuf[0] = type;
266 mcp->txbuf[1] = msg->len & 0xff;
267 mcp->txbuf[2] = msg->len >> 8;
268 mcp->txbuf[3] = (u8)(msg->addr << 1);
272 mcp->txbuf[1] = smbus_len;
273 mcp->txbuf[2] = 0;
274 mcp->txbuf[3] = (u8)(smbus_addr << 1);
279 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 4);
286 memset(mcp->txbuf, 0, 4);
287 mcp->txbuf[0] = MCP2221_I2C_GET_DATA;
289 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
368 mcp->txbuf[0] = type;
369 mcp->txbuf[1] = len + 1; /* 1 is due to command byte itself */
370 mcp->txbuf[2] = 0;
371 mcp->txbuf[3] = (u8)(addr << 1);
372 mcp->txbuf[4] = command;
379 mcp->txbuf[5] = buf[0];
383 mcp->txbuf[5] = buf[0];
384 mcp->txbuf[6] = buf[1];
391 memcpy(&mcp->txbuf[5], buf, len);
395 ret = mcp_send_data_req_status(mcp, mcp->txbuf, data_len);
484 mcp->txbuf[0] = MCP2221_I2C_GET_DATA;
485 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
507 mcp->txbuf[0] = MCP2221_I2C_GET_DATA;
508 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
576 mcp->txbuf[0] = MCP2221_GPIO_GET;
581 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
592 memset(mcp->txbuf, 0, 18);
593 mcp->txbuf[0] = MCP2221_GPIO_SET;
597 mcp->txbuf[mcp->gp_idx - 1] = 1;
598 mcp->txbuf[mcp->gp_idx] = !!value;
601 mcp_send_data_req_status(mcp, mcp->txbuf, 18);
608 memset(mcp->txbuf, 0, 18);
609 mcp->txbuf[0] = MCP2221_GPIO_SET;
613 mcp->txbuf[mcp->gp_idx - 1] = 1;
614 mcp->txbuf[mcp->gp_idx] = val;
616 return mcp_send_data_req_status(mcp, mcp->txbuf, 18);
657 mcp->txbuf[0] = MCP2221_GPIO_GET;
662 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
738 if ((mcp->txbuf[3] == MCP2221_I2C_SET_SPEED) &&