STRUCT CROS_EC_SPI(9)
π struct cros_ec_spi(9) π
okay so this is a page from the Kernel API Manual, and honestly? it's giving "tiny struct, huge responsibilities." we're talking about struct cros_ec_spi β the whole vibe of it. π¦
β¨ NAME β¨
struct cros_ec_spi β literally all the info about a SPI-connected EC. that's it, that's the struct. π
πΈ SYNOPSIS πΈ
struct cros_ec_spi {
struct spi_device *spi;
s64 last_transfer_ns;
unsigned int start_of_msg_delay;
unsigned int end_of_msg_delay;
struct kthread_worker *high_pri_worker;
};
look at her. five fields. absolutely iconic. no notes. π
π«Ά Members π«Ά
bestie, let's go field by field, because every single one of these matters:
spiβ the SPI device we are connected to. like, the actual hardware bae. πlast_transfer_nsβ the time that we last finished a transfer. yes, in nanoseconds. she keeps receipts. β±οΈstart_of_msg_delayβ this one's used to set thedelay_usecson thespi_transferthat gets sent when we want to turn on CS at the start of a transaction. CS goes on β delay gets set β slay. πend_of_msg_delayβ same energy, opposite end: used to set thedelay_usecson thespi_transferthat is sent when we want to turn off CS at the end of a transaction. π¬high_pri_workerβ Used to schedule high priority work. main character energy only. this worker does NOT do side quests. π₯
π SEE ALSO π
go be nosy, i support it. check out:
- Kernel file
./drivers/platform/chrome/cros_ec_spi.c struct cros_ec_xfer_work_params(9)receive_n_bytes(9)cros_ec_spi_receive_packet(9)cros_ec_spi_receive_response(9)do_cros_ec_pkt_xfer_spi(9)do_cros_ec_cmd_xfer_spi(9)
like, read them. it's called β¨researchβ¨. π
ok real talk for one sec: everything above is exactly what the page says β i didn't add a single behavior, default, or caveat. don't come for me if your kernel does something else, i'm just the messenger angel π§
and that's the page!! π this came out of ./drivers/platform/chrome, dated October 2026, and it's filed under struct cros_ec_spi(9) β so next time someone asks, you already know. mwah π
π¦ 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