cros_ec_prepare_tx(9)
cros_ec_prepare_tx(9) πβ¨
okay bestie, welcome to the Kernel API Manual entry for cros_ec_prepare_tx(9) β yes, the one and only. this is the little helper that gets your outgoing ChromeOS EC message all cute and ready in the output buffer, no cap. π«Ά
πΈ NAME πΈ
cros_ec_prepare_tx β prepare an outgoing message in the output buffer. π
β¨ SYNOPSIS β¨
int cros_ec_prepare_tx (struct cros_ec_device *ec_dev , struct
cros_ec_command *msg );
π«Ά ARGUMENTS π«Ά
ec_devβ device to register. literally that's the one.msgβ message to write. the message itself, bestie. π¨
π DESCRIPTION π
this is used by all ChromeOS EC drivers to prepare the outgoing message according to different protocol versions. so yeah, it's giving "universal prep step" energy: different protocol versions, same function doing the prep work. β¨
π₯ RETURN π₯
on success you get the number of prepared bytes β slay. on failure you get a negative error code, so if it's negative, that's your cue to be like "oop, error" π. periodt.
π¦ SEE ALSO π¦
- Kernel file:
./drivers/platform/chrome/cros_ec_proto.c 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(9)cros_ec_cmd_readmem(9)cros_ec_get_cmd_versions(9)cros_ec_device_registered(9)
cute sign-off time π: this page came from the source/version footer at ./drivers/platform/chrome, dated October 2026, for cros_ec_prepare_tx(9). byeee ππ·
π¦ 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