STRUCT EC_HOST_RESPONSE(9)
π struct ec_host_response(9) β the Kernel API Manual glow-up β¨
okay bestie, so this is the page for struct ec_host_response in the Kernel API Manual, and it's literally the Version 3 response that comes back from the EC. she's the reply-text of the embedded controller world and we're gonna read her top to bottom π
πΈ NAME πΈ
struct ec_host_response β Version 3 response from EC. that's it, that's the whole vibe π
β¨ SYNOPSIS β¨
here's the whole struct, exactly as she ships, no cap:
struct ec_host_response {
uint8_t struct_version;
uint8_t checksum;
uint16_t result;
uint16_t data_len;
uint16_t reserved;
};
π¦ DESCRIPTION π¦
this is the header that rides in front of the actual response data β she announces herself, tells you how long the payload is, and then the data follows her. every member gets its own little moment below π
π MEMBERS π
struct_versionβ the struct version, and she's a3. iconic, consistent, no notes πchecksumβ the checksum of the response and the data. here's the tea: the sum of all the bytes, including the checksum byte itself, should total to0. so if it doesn't add up to zero, something's sus and the vibe check failed πresultβ the EC's actual response to the command. super important distinction, bestie: this is separate from a communication failure, so a sadresultis not the same thing as the transport going sideways πdata_lenβ the length of the data that follows this header. so she's telling you how much more to read πreservedβ unused bytes in the current protocol version. set it to0and move on, fr fr π
π SEE ALSO π
the whole extended friend group, all from the kernel file ./include/linux/platform_data/cros_ec_commands.h π
struct ec_lpc_host_args(9)struct ec_host_request(9)struct ec_response_proto_version(9)struct ec_params_hello(9)struct ec_response_hello(9)struct ec_response_get_version(9)struct ec_params_read_test(9)struct ec_response_read_test(9)struct ec_response_get_chip_info(9)struct ec_response_board_version(9)struct ec_params_read_memmap(9)struct ec_params_get_cmd_versions(9)struct ec_params_get_cmd_versions_v1(9)struct ec_response_get_cmd_versions(9)struct ec_response_get_comms_status(9)struct ec_response_get_protocol_info(9)struct ec_response_flash_info(9)struct ec_response_flash_info_1(9)struct ec_params_flash_read(9)struct ec_params_flash_write(9)struct ec_params_flash_erase(9)struct ec_params_flash_erase_v1(9)struct ec_params_flash_protect(9)struct ec_response_flash_protect(9)struct ec_params_flash_region_info(9)struct ec_params_flash_select(9)struct ec_params_cec_write(9)struct ec_params_cec_write_v1(9)struct ec_params_cec_read(9)struct ec_response_cec_read(9)struct ec_params_cec_set(9)struct ec_params_cec_get(9)struct ec_response_cec_get(9)struct ec_response_cec_port_count(9)struct ec_params_battery_static_info(9)struct ec_response_battery_static_info(9)struct ec_params_battery_dynamic_info(9)struct ec_response_battery_dynamic_info(9)struct ec_params_charger_control(9)
ok that's the whole page bestie, nothing skipped, every single struct accounted for π«Ά go read your EC responses responsibly π
signed, sealed, delivered from ./include/linux/platform_data π β dated October 2026, page struct ec_host_response(9), Kernel API Manual, mwah π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms