STRUCT EC_RESPONSE_GET_PROTOCOL_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 is 1 << n means 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 β€” see EC_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's flags β†’ see EC_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