Lines Matching refs:msg

55 	struct cros_ec_command *msg;  in reboot_store()  local
62 msg = kmalloc(sizeof(*msg) + sizeof(*param), GFP_KERNEL); in reboot_store()
63 if (!msg) in reboot_store()
66 param = (struct ec_params_reboot_ec *)msg->data; in reboot_store()
99 msg->version = 0; in reboot_store()
100 msg->command = EC_CMD_REBOOT_EC + ec->cmd_offset; in reboot_store()
101 msg->outsize = sizeof(*param); in reboot_store()
102 msg->insize = 0; in reboot_store()
103 ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg); in reboot_store()
107 kfree(msg); in reboot_store()
118 struct cros_ec_command *msg; in version_show() local
123 msg = kmalloc(sizeof(*msg) + EC_HOST_PARAM_SIZE, GFP_KERNEL); in version_show()
124 if (!msg) in version_show()
128 msg->version = 0; in version_show()
129 msg->command = EC_CMD_GET_VERSION + ec->cmd_offset; in version_show()
130 msg->insize = sizeof(*r_ver); in version_show()
131 msg->outsize = 0; in version_show()
132 ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg); in version_show()
137 r_ver = (struct ec_response_get_version *)msg->data; in version_show()
151 msg->command = EC_CMD_GET_BUILD_INFO + ec->cmd_offset; in version_show()
152 msg->insize = EC_HOST_PARAM_SIZE; in version_show()
153 ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg); in version_show()
157 ret, msg->result); in version_show()
159 msg->data[EC_HOST_PARAM_SIZE - 1] = '\0'; in version_show()
161 "Build info: %s\n", msg->data); in version_show()
165 msg->command = EC_CMD_GET_CHIP_INFO + ec->cmd_offset; in version_show()
166 msg->insize = sizeof(*r_chip); in version_show()
167 ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg); in version_show()
171 ret, msg->result); in version_show()
173 r_chip = (struct ec_response_get_chip_info *)msg->data; in version_show()
187 msg->command = EC_CMD_GET_BOARD_VERSION + ec->cmd_offset; in version_show()
188 msg->insize = sizeof(*r_board); in version_show()
189 ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg); in version_show()
193 ret, msg->result); in version_show()
195 r_board = (struct ec_response_board_version *)msg->data; in version_show()
203 kfree(msg); in version_show()
211 struct cros_ec_command *msg; in flashinfo_show() local
215 msg = kmalloc(sizeof(*msg) + sizeof(*resp), GFP_KERNEL); in flashinfo_show()
216 if (!msg) in flashinfo_show()
220 msg->version = 0; in flashinfo_show()
221 msg->command = EC_CMD_FLASH_INFO + ec->cmd_offset; in flashinfo_show()
222 msg->insize = sizeof(*resp); in flashinfo_show()
223 msg->outsize = 0; in flashinfo_show()
224 ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg); in flashinfo_show()
228 resp = (struct ec_response_flash_info *)msg->data; in flashinfo_show()
236 kfree(msg); in flashinfo_show()
247 struct cros_ec_command *msg; in kb_wake_angle_show() local
250 msg = kmalloc(sizeof(*msg) + EC_HOST_PARAM_SIZE, GFP_KERNEL); in kb_wake_angle_show()
251 if (!msg) in kb_wake_angle_show()
254 param = (struct ec_params_motion_sense *)msg->data; in kb_wake_angle_show()
255 msg->command = EC_CMD_MOTION_SENSE_CMD + ec->cmd_offset; in kb_wake_angle_show()
256 msg->version = 2; in kb_wake_angle_show()
259 msg->outsize = sizeof(*param); in kb_wake_angle_show()
260 msg->insize = sizeof(*resp); in kb_wake_angle_show()
262 ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg); in kb_wake_angle_show()
266 resp = (struct ec_response_motion_sense *)msg->data; in kb_wake_angle_show()
269 kfree(msg); in kb_wake_angle_show()
279 struct cros_ec_command *msg; in kb_wake_angle_store() local
287 msg = kmalloc(sizeof(*msg) + EC_HOST_PARAM_SIZE, GFP_KERNEL); in kb_wake_angle_store()
288 if (!msg) in kb_wake_angle_store()
291 param = (struct ec_params_motion_sense *)msg->data; in kb_wake_angle_store()
292 msg->command = EC_CMD_MOTION_SENSE_CMD + ec->cmd_offset; in kb_wake_angle_store()
293 msg->version = 2; in kb_wake_angle_store()
296 msg->outsize = sizeof(*param); in kb_wake_angle_store()
297 msg->insize = sizeof(struct ec_response_motion_sense); in kb_wake_angle_store()
299 ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg); in kb_wake_angle_store()
300 kfree(msg); in kb_wake_angle_store()