cros_ec_cmd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, welcome to the Kernel API Manual page for cros_ec_cmd(9) β€” it's giving tiny kernel helper, huge main character energy ✨ and no cap, it's useful.

cros_ec_cmd β€” Send a command to the EC. πŸ’…


✨ SYNOPSIS ✨

this is the exact function signature, so copy it like your life depends on it:

       int cros_ec_cmd (struct cros_ec_device *ec_dev , unsigned int version ,
       int command , const void *outdata , size_t outsize , void *indata ,
       size_t insize );

πŸŽ€ ARGUMENTS πŸŽ€

  • ec_dev β€” the EC device, your little hardware bestie 🫢
  • version β€” EC command version, iykyk
  • command β€” EC command, the command itself πŸ’Œ
  • outdata β€” EC command output data, literally what the page says πŸ“€
  • outsize β€” the size of outdata, iconic
  • indata β€” EC command input data πŸ“₯
  • insize β€” the size of indata, periodt

πŸ’– RETURN πŸ’–

  • >= 0 on success β€” slay, it worked ✨
  • negative error number on failure β€” not the vibe check you wanted 😭

πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file is ./drivers/platform/chrome/cros_ec_proto.c, and here's the whole friend group:

mwah πŸ’‹ this cutie comes from the source/version ./drivers/platform/chrome, dated October 2026, and yes, it's still the cros_ec_cmd(9) manual page. bye bestie 🫢

πŸ“¦ where this page comes from