STRUCT CROS_EC_PLATFORM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ struct cros_ec_platform(9) β€” like, the Kernel API Manual era ✨

okay so bestie, welcome to the glow-up of cros_ec_platform πŸ’… this is the little struct that carries around your ChromeOS EC platform info β€” the receipts, the vibes, the whole ✨situation✨. it lives in the kernel, it's lowkey iconic, and we're gonna read it together like a group chat at 2am 🫢


🌸 NAME 🌸

struct cros_ec_platform β€” ChromeOS EC platform information. that's it, that's the whole main-character job πŸŽ€


✨ SYNOPSIS ✨

struct cros_ec_platform {
    const char *ec_name;
    u16 cmd_offset;
};

look at her. two fields. no notes. ate and left no crumbs πŸ‘‘


πŸ’– Members πŸ’–

  • ec_name β€” the name of the EC device, like 'cros-ec', 'cros-pd', ... (you get the idea, the list goes on πŸ’«). this is the name that shows up in /dev/ and in sysfs, so like, it's the one doing the introducing at the party 🌈. type is const char *, ngl she's a keeper.
  • cmd_offset β€” the offset to apply for each command πŸ”₯. it gets set when you're registering a device that sits behind another one β€” like, the device is standing behind its friend in the photo, y'know? πŸ“Έ type is u16, so keep it cute and keep it in range πŸ’€.

πŸ¦‹ SEE ALSO πŸ¦‹

  • the kernel file ./include/linux/platform_data/cros_ec_proto.h πŸ“
  • struct cros_ec_command(9) β€” the command struct, bestie of the family πŸ’œ
  • struct cros_ec_device(9) β€” the device struct, also here, also slaying ✨
  • struct cros_ec_dev(9) β€” the dev struct, you guessed it, in the lineup 🌸
  • cros_ec_get_time_ns(9) β€” the time-getting one, clocking in with nanosecond precision ⏱️
fr fr go read those too, they're all connected, iykyk 🧚

aaaand that's the page!! mwah πŸ’‹ this whole thing is filed under ./include/linux/platform_data, dated October 2026, and it's brought to you by the one and only Kernel API Manual β€” periodt, no cap, bye bestie πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from