STRUCT EC_RESPONSE_GET_PROTOCOL_INFO(9)
π struct ec_response_get_protocol_info β the Kernel API Manual glow-up β¨
okay bestie so this is a page from the Kernel API Manual (struct ec_response_get_protocol_info(9), iykyk) and it's literally about the reply you get when you ask the EC "hey what protocol stuff do you speak?" β and the answer comes back in this one iconic little struct. no cap, it's giving "hello, here are my credentials" energy π
πΈ NAME πΈ
struct ec_response_get_protocol_info β the response to the get protocol info. that's it, that's the whole vibe π
β SYNOPSIS β
struct ec_response_get_protocol_info {
uint32_t protocol_versions;
uint16_t max_request_packet_size;
uint16_t max_response_packet_size;
uint32_t flags;
};
look at her. four fields. main character energy fr fr π¦
β¨ Members β¨
okay so let's meet the cast π«Ά
π the fields themselves
protocol_versionsβ a bitmask of the protocol versions that are supported, and the way it works is1 << nmeans version n. so like, shift a one over by n and that's your version being repped. bit math but make it fashion β¨max_request_packet_sizeβ the maximum request packet size, in bytes. that's the biggest ask you can send, no exaggeration πmax_response_packet_sizeβ the maximum response packet size, in bytes. the biggest reply you'll get back. she's not gonna text you a novel longer than this πflagsβ seeEC_PROTOCOL_INFO_*. that's the whole note, go look at the flags, bestie π
π SEE ALSO π
the whole friend group, all linked from Kernel file ./include/linux/platform_data/cros_ec_commands.h β literally the mothership file π§ββοΈ
struct ec_lpc_host_args(9)struct ec_host_request(9)struct ec_host_response(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_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)
like. forty of them. she knows everyone at the party π₯
heads up bestie: it'sflagsβ seeEC_PROTOCOL_INFO_*, don't just guess what the bits do, go read the actual flags, periodt π
okay that's the page!! mwah π this came out of Kernel file ./include/linux/platform_data and the version stamp on it is October 2026, so jot that down β ./include/linux/platform_data, October 2026, struct ec_response_get_protocol_info(9). slay, go forth and parse packets responsibly ππ
π¦ 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