STRUCT EC_EVENT(9)
πΈ struct ec_event(9) πΈ
okay so real talk, welcome to the Kernel API Manual, section 9, bestie β we're doing struct ec_event today and honestly? it ate. this is the extended event that gets handed back to you by the EC, and yes that's the whole vibe π
β¨ NAME β¨
struct ec_event β the extended event that the EC returns to you π«Ά that's it, that's the whole name section, slay.
π SYNOPSIS π
here's the shape of it, copy it exactly, no cap:
struct ec_event {
u16 size;
u16 type;
u16 event[];
};
look at that little flexible array member living its main character life at the end π iconic behavior honestly.
π¦ Members π¦
okay so let's meet the members, they're all so important:
sizeβ the number of 16bit words in the structure after the size word, okay? so don't count the size word itself, count everything after it. lowkey the most important detail here, don't fumble it πtypeβ the extended event type. and bestie... it's meaningless for us π like literally we don't use it, it's just kinda there being decorative. still gotta have it in the struct though πeventβ the actual event data words, the good stuff β¨ and heads up: the max count isEC_ACPI_MAX_EVENT_WORDS, so don't go over that, fr fr π₯
π SEE ALSO π
go read these next, bestie, they're all connected, iykyk:
- Kernel file
./drivers/platform/chrome/wilco_ec/event.cβ yeah that's the source file, go look at it πΈ struct ec_event_queue(9)struct event_device_data(9)enqueue_events(9)event_device_notify(9)event_read(9)free_device_data(9)event_device_probe(9)
and that's the whole page, you ate that honestly π this came from ./drivers/platform/chrome/wilc... (the path got a little truncated, it's giving mysterious β¨) and it's dated October 2026, and the page is struct ec_event(9) β okay bye bestie, go write some kernel code ππ§
π¦ 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