cros_ec_spi_...ive_response(9)
π cros_ec_spi_receive_response(9) β the one where the EC finally texts back
okay bestie, welcome to the Kernel API Manual for cros_ec_spi_receive_response β¨ this is the little function that sits there waiting for your ChromeOS Embedded Controller to slide into your DMs with an actual response π«Ά
πΈ NAME πΈ
cros_ec_spi_receive_response β receive a response from the EC. like, literally the whole personality of this function is "get the reply" π
β¨ SYNOPSIS β¨
int cros_ec_spi_receive_response (struct cros_ec_device *ec_dev , int need_len );
that's it. that's the whole vibe. two args, one int coming back at you π
π ARGUMENTS π
ec_devβ your ChromeOS EC device, the main character this whole function is simping for πneed_lenβ the number of message bytes we need to read. like how many texts you're actually waiting on before you can close the group chat π
π¦ DESCRIPTION π¦
okay so this function is a two-phase girlie, and you're gonna respect both phases π
- reading the preamble bytes β because if we read data from the EC before it is ready to send, we just get preamble. yes, that's a real thing that's in the documentation, it's giving "you texted first and got left on read" π the EC hasn't finished getting ready and you're already grabbing bytes, so all you get is preamble, no cap.
- reading the actual message β the real response, the one you actually wanted π
where does the received data land? it gets placed into ec_dev->din β that's the field, that's the home, that's where the message moves in and puts up fairy lights π§π
fr fr though: don't skip the preamble phase in your head, because the whole reason it exists is that reading too early just gets you preamble bytes instead of your message. the docs said it, so i'm saying it πΈ
π SEE ALSO π
sibling functions and structs, all linked together in the kernel family group chat π¬
- Kernel file
./drivers/platform/chrome/cros_ec_spi.c struct cros_ec_spi(9)struct cros_ec_xfer_work_params(9)receive_n_bytes(9)cros_ec_spi_receive_packet(9)do_cros_ec_pkt_xfer_spi(9)do_cros_ec_cmd_xfer_spi(9)
and that's the page, bestie π«Ά this absolute icon lives in ./drivers/platform/chrome and was dated October 2026 under the header cros_ec_spi_...ive_response(9) β go read it again, i know you want to β¨ππ
π¦ 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