Lines Matching refs:cmd
28 u8 cmd; member
227 struct olpc_xo175_ec_cmd cmd; member
239 struct olpc_xo175_ec_cmd cmd; member
254 static int olpc_xo175_ec_resp_len(u8 cmd) in olpc_xo175_ec_resp_len() argument
258 for (p = olpc_xo175_ec_cmds; p->cmd; p++) { in olpc_xo175_ec_resp_len()
259 if (p->cmd == cmd) in olpc_xo175_ec_resp_len()
275 static void olpc_xo175_ec_send_command(struct olpc_xo175_ec *priv, void *cmd, in olpc_xo175_ec_send_command() argument
280 memcpy(&priv->tx_buf, cmd, cmdlen); in olpc_xo175_ec_send_command()
356 memset(&priv->cmd, 0, sizeof(priv->cmd)); in olpc_xo175_ec_complete()
357 priv->cmd.command = CMD_ECHO; in olpc_xo175_ec_complete()
364 olpc_xo175_ec_send_command(priv, &priv->cmd, sizeof(priv->cmd)); in olpc_xo175_ec_complete()
473 static int olpc_xo175_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *resp, in olpc_xo175_ec_cmd() argument
482 dev_dbg(dev, "CMD %x, %zd bytes expected\n", cmd, resp_len); in olpc_xo175_ec_cmd()
494 ret = olpc_xo175_ec_resp_len(cmd); in olpc_xo175_ec_cmd()
496 dev_err_ratelimited(dev, "unknown command 0x%x\n", cmd); in olpc_xo175_ec_cmd()
520 memset(&priv->cmd, 0, sizeof(priv->cmd)); in olpc_xo175_ec_cmd()
521 priv->cmd.command = cmd; in olpc_xo175_ec_cmd()
522 priv->cmd.nr_args = inlen; in olpc_xo175_ec_cmd()
523 priv->cmd.data_len = 0; in olpc_xo175_ec_cmd()
524 memcpy(priv->cmd.args, inbuf, inlen); in olpc_xo175_ec_cmd()
550 cmd, priv->resp_data[0]); in olpc_xo175_ec_cmd()
554 cmd, priv->resp_len, nr_bytes); in olpc_xo175_ec_cmd()