STRUCT CROS_EC_COMMAND(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct cros_ec_command(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual page for struct cros_ec_command β€” yes that's the manual name, it's giving "I live in the kernel docs now" and honestly? iconic. this one's all about the info that describes a ChromeOS EC command. let's get into it πŸ¦‹


✨ NAME ✨

struct cros_ec_command β€” literally just the info about a ChromeOS EC command. that's the whole vibe. no cap. πŸ’…


🌸 SYNOPSIS 🌸

struct cros_ec_command {
    uint32_t version;
    uint32_t command;
    uint32_t outsize;
    uint32_t insize;
    uint32_t result;
    uint8_t data[];
};

look at her. five uint32_ts and one gorgeous flexible uint8_t data[] array. main character struct fr fr πŸ‘‘


πŸŽ€ Members πŸŽ€

  • version β€” the command version number (often 0, so don't stress it bestie 🫢).
  • command β€” the actual command to send, and it's an EC_CMD_... one, iykyk.
  • outsize β€” the outgoing length, in bytes. how much you're yeeting out the door.
  • insize β€” the max number of bytes to accept from the EC. like a little bouncer at the club, strictly capping what comes back in πŸ’€
  • result β€” the EC's response to the command. and yes, this is separate from a communication failure β€” so a bad result and a broken chat are two different problems, keep that straight πŸ™ˆ
  • data β€” where the incoming data from the EC goes, and where the outgoing data to the EC comes from. both directions, one spot, she's doing double duty and slaying it ✨

πŸ¦‹ SEE ALSO πŸ¦‹

  • kernel file ./include/linux/platform_data/cros_ec_proto.h struct cros_ec_device(9)
  • struct cros_ec_platform(9)
  • struct cros_ec_dev(9)
  • cros_ec_get_time_ns(9)

go read those, they're all part of the same friend group bestie πŸ’œ


anyway that's the whole page, mwah πŸ’‹ β€” this came from ./include/linux/platform_data, dated October 2026, and it's struct cros_ec_command(9) forever and always. periodt. 🌈

πŸ“¦ where this page comes from