Lines Matching refs:txbuf
99 u8 txbuf[64];
174 memset(mcp->txbuf, 0, 8);
175 mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
177 return mcp_send_data_req_status(mcp, mcp->txbuf, 8);
183 memset(mcp->txbuf, 0, 8);
184 mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
185 mcp->txbuf[2] = MCP2221_I2C_CANCEL;
187 return mcp_send_data_req_status(mcp, mcp->txbuf, 8);
194 memset(mcp->txbuf, 0, 8);
195 mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
196 mcp->txbuf[3] = MCP2221_I2C_SET_SPEED;
197 mcp->txbuf[4] = mcp->cur_i2c_clk_div;
199 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 8);
230 mcp->txbuf[0] = type;
231 mcp->txbuf[1] = msg->len & 0xff;
232 mcp->txbuf[2] = msg->len >> 8;
233 mcp->txbuf[3] = (u8)(msg->addr << 1);
235 memcpy(&mcp->txbuf[4], &msg->buf[idx], len);
237 ret = mcp_send_data_req_status(mcp, mcp->txbuf, len + 4);
282 mcp->txbuf[0] = type;
284 mcp->txbuf[1] = msg->len & 0xff;
285 mcp->txbuf[2] = msg->len >> 8;
286 mcp->txbuf[3] = (u8)(msg->addr << 1);
290 mcp->txbuf[1] = smbus_len;
291 mcp->txbuf[2] = 0;
292 mcp->txbuf[3] = (u8)(smbus_addr << 1);
297 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 4);
304 memset(mcp->txbuf, 0, 4);
305 mcp->txbuf[0] = MCP2221_I2C_GET_DATA;
307 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
386 mcp->txbuf[0] = type;
387 mcp->txbuf[1] = len + 1; /* 1 is due to command byte itself */
388 mcp->txbuf[2] = 0;
389 mcp->txbuf[3] = (u8)(addr << 1);
390 mcp->txbuf[4] = command;
397 mcp->txbuf[5] = buf[0];
401 mcp->txbuf[5] = buf[0];
402 mcp->txbuf[6] = buf[1];
409 memcpy(&mcp->txbuf[5], buf, len);
413 ret = mcp_send_data_req_status(mcp, mcp->txbuf, data_len);
502 mcp->txbuf[0] = MCP2221_I2C_GET_DATA;
503 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
525 mcp->txbuf[0] = MCP2221_I2C_GET_DATA;
526 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
595 mcp->txbuf[0] = MCP2221_GPIO_GET;
600 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
611 memset(mcp->txbuf, 0, 18);
612 mcp->txbuf[0] = MCP2221_GPIO_SET;
616 mcp->txbuf[mcp->gp_idx - 1] = 1;
617 mcp->txbuf[mcp->gp_idx] = !!value;
620 mcp_send_data_req_status(mcp, mcp->txbuf, 18);
627 memset(mcp->txbuf, 0, 18);
628 mcp->txbuf[0] = MCP2221_GPIO_SET;
632 mcp->txbuf[mcp->gp_idx - 1] = 1;
633 mcp->txbuf[mcp->gp_idx] = val;
635 return mcp_send_data_req_status(mcp, mcp->txbuf, 18);
676 mcp->txbuf[0] = MCP2221_GPIO_GET;
681 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
758 if ((mcp->txbuf[3] == MCP2221_I2C_SET_SPEED) &&
874 if (mcp->txbuf[1] != 0) {
984 memset(mcp->txbuf, 0, 12);
985 mcp->txbuf[0] = MCP2221_SET_SRAM_SETTINGS;
986 mcp->txbuf[4] = BIT(7) | val;
988 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 12);
1050 mcp->txbuf[0] = MCP2221_GET_SRAM_SETTINGS;
1051 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
1060 mcp->txbuf[0] = MCP2221_READ_FLASH_DATA;
1061 mcp->txbuf[1] = 0;
1062 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 2);