cros_ec_check_result(9)
π cros_ec_check_result(9) π
okay bestie, welcome to the Kernel API Manual β¨ today we're looking at cros_ec_check_result and honestly? she's a tiny little legend. let's get into it π«Ά
πΈ NAME πΈ
cros_ec_check_result β literally just checks ec_msg->result. that's it. that's the whole job. iconic minimalism π
β¨ SYNOPSIS β¨
int cros_ec_check_result (struct cros_ec_device *ec_dev , struct
cros_ec_command *msg );
look at her go π so simple, so clean, so coder-core π
π¦ ARGUMENTS π¦
ec_devβ the EC device in question, aka the main character of this whole situation πmsgβ the message we're checking. yes bestie, that one. go check it π
π DESCRIPTION π
so here's the vibe: the ChromeOS EC drivers use this function to peek at ec_msg->result, specifically to look for EC_RES_IN_PROGRESS and to warn about it. it's giving "just doing a lil vibe check on the return value" π
β οΈ and this part is important, like fr fr β the function should not check for furthermore error codes. otherwise? it would break the ABI. and we do not break the ABI in this house π full stop, periodt.
π₯ RETURN π₯
-EAGAINifec_msg->result == EC_RES_IN_PROGRESSπ- otherwise,
0β¨ simple as that bestie
π§ SEE ALSO π§
kernel file: ./drivers/platform/chrome/cros_ec_proto.c β go read it, iykyk π
and the whole friend group of related functions, slay:
cros_ec_prepare_tx(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(9)cros_ec_cmd_readmem(9)cros_ec_get_cmd_versions(9)cros_ec_device_registered(9)
okay that's the whole page bestie, you ate that π β¨
this little drop came to you from ./drivers/platform/chrome, dated October 2026, and the header up top is cros_ec_check_result(9) β mwah, love u, bye ππ¦π
π¦ 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