aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2014-06-18 14:14:02 -0400
committerLee Jones <lee.jones@linaro.org>2014-07-09 09:58:17 -0400
commit5d4773e27e8ab37491767a6ef99ffd7100fe6341 (patch)
treef60c57790cbd87676c3dbe978565b925889b3543 /include/linux
parent9c5edb6c458b04a243c4ba09a60349367b36e761 (diff)
mfd: cros_ec: Use struct cros_ec_command to communicate with the EC
This is some internal structure reorganization / renaming to prepare for future patches that will add a userspace API to cros_ec. There should be no visible changes. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/cros_ec.h35
1 files changed, 18 insertions, 17 deletions
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h
index 79a35857cc9e..f27c03766069 100644
--- a/include/linux/mfd/cros_ec.h
+++ b/include/linux/mfd/cros_ec.h
@@ -35,23 +35,23 @@ enum {
35 EC_MSG_TX_PROTO_BYTES, 35 EC_MSG_TX_PROTO_BYTES,
36}; 36};
37 37
38/** 38/*
39 * struct cros_ec_msg - A message sent to the EC, and its reply
40 *
41 * @version: Command version number (often 0) 39 * @version: Command version number (often 0)
42 * @cmd: Command to send (EC_CMD_...) 40 * @command: Command to send (EC_CMD_...)
43 * @out_buf: Outgoing payload (to EC) 41 * @outdata: Outgoing data to EC
44 * @outlen: Outgoing length 42 * @outsize: Outgoing length in bytes
45 * @in_buf: Incoming payload (from EC) 43 * @indata: Where to put the incoming data from EC
46 * @in_len: Incoming length 44 * @insize: Incoming length in bytes (filled in by EC)
45 * @result: EC's response to the command (separate from communication failure)
47 */ 46 */
48struct cros_ec_msg { 47struct cros_ec_command {
49 u8 version; 48 uint32_t version;
50 u8 cmd; 49 uint32_t command;
51 uint8_t *out_buf; 50 uint8_t *outdata;
52 int out_len; 51 uint32_t outsize;
53 uint8_t *in_buf; 52 uint8_t *indata;
54 int in_len; 53 uint32_t insize;
54 uint32_t result;
55}; 55};
56 56
57/** 57/**
@@ -114,7 +114,8 @@ struct cros_ec_device {
114 struct device *parent; 114 struct device *parent;
115 bool wake_enabled; 115 bool wake_enabled;
116 struct mutex lock; 116 struct mutex lock;
117 int (*cmd_xfer)(struct cros_ec_device *ec, struct cros_ec_msg *msg); 117 int (*cmd_xfer)(struct cros_ec_device *ec,
118 struct cros_ec_command *msg);
118}; 119};
119 120
120/** 121/**
@@ -148,7 +149,7 @@ int cros_ec_resume(struct cros_ec_device *ec_dev);
148 * @msg: Message to write 149 * @msg: Message to write
149 */ 150 */
150int cros_ec_prepare_tx(struct cros_ec_device *ec_dev, 151int cros_ec_prepare_tx(struct cros_ec_device *ec_dev,
151 struct cros_ec_msg *msg); 152 struct cros_ec_command *msg);
152 153
153/** 154/**
154 * cros_ec_remove - Remove a ChromeOS EC 155 * cros_ec_remove - Remove a ChromeOS EC