cros_ec_cmd(9)
πΈ 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, iykykcommandβ EC command, the command itself πoutdataβ EC command output data, literally what the page says π€outsizeβ the size ofoutdata, iconicindataβ EC command input data π₯insizeβ the size ofindata, periodt
π RETURN π
>= 0on 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:
cros_ec_prepare_tx(9)cros_ec_check_result(9)cros_ec_get_host_event_wake_mask(9)cros_ec_get_host_command_version_mask(9)cros_ec_query_all(9)cros_ec_cmd_xfer(9)cros_ec_cmd_xfer_status(9)cros_ec_get_next_event(9)cros_ec_get_host_event(9)cros_ec_read_features(9)cros_ec_check_features(9)cros_ec_get_sensor_count(9)cros_ec_cmd_readmem(9)cros_ec_get_cmd_versions(9)cros_ec_device_registered(9)
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
- 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