cros_ec_handle_event(9)
π cros_ec_handle_event β the Kernel API Manual, bestie edition β¨
Okay so picture this: you're deep in the ChromeOS embedded controller lore, the Kernel API Manual is open on your other monitor, and you've landed on cros_ec_handle_event(9). Bestie, you're in the right place β let's get into it π«Ά
πΈ NAME πΈ
cros_ec_handle_event β process and forward pending events on EC π
Like, it takes the events the EC is sitting on, deals with them, and passes them along. Main character behavior, honestly.
β¨ SYNOPSIS β¨
bool cros_ec_handle_event (struct cros_ec_device *ec_dev );
That's the whole signature. Clean. Iconic. No notes π
π ARGUMENTS π
ec_devβ the Device with events to process. It's giving "the EC that has tea to spill" and you're the one holding the cup π
π¦ DESCRIPTION π¦
Call this function in a loop when the kernel is notified that the EC has pending events.
That's literally it, but the "in a loop" part is doing so much work β the kernel says "hey, EC's got stuff queued up," and you keep calling this until it stops saying that. Not me being obsessed with a while loop π
β RETURN β
Returns true if more events are still pending and this function should be called again.
So like β true means "girl, we're not done, run it back π
" and anything else means you can clock out. The loop check is the whole vibe check, no cap.
π SEE ALSO π
Kernel file ./drivers/platform/chrome/cros_ec.c, plus the whole friend group:
cros_ec_irq_handler(9)cros_ec_irq_thread(9)cros_ec_register(9)cros_ec_unregister(9)cros_ec_suspend_prepare(9)cros_ec_suspend_late(9)cros_ec_suspend(9)cros_ec_resume_complete(9)cros_ec_resume_early(9)cros_ec_resume(9)
Go read them. They ate π₯
Ngl, if you skip the loop and call this exactly once, don't come crying to me when events are still pending. The return value is literally telling you what to do π
Okay that's the page!! Big slay to whoever maintains ./drivers/platform/chrome β you're carrying the Kernel API Manual on your back fr fr π And a very cute little timestamp for you: October 2026 β¨π¦ see u next commit bestie π
π¦ 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