cros_ec_sensors_capture(9)
π cros_ec_sensors_capture(9) β from the Kernel API Manual, bestie
okay so first things first: yes, this is a page from the Kernel API Manual (section 9, kernel developer vibes only β¨), and we're talking about cros_ec_sensors_capture. it's short, it's sweet, and it's lowkey the moment the magic happens. let's get into it π«Ά
πΈ NAME πΈ
cros_ec_sensors_capture β the trigger handler function. that's it, that's the whole name. icon behavior honestly π
β¨ SYNOPSIS β¨
irqreturn_t cros_ec_sensors_capture (int irq , void *p );
look at her. so tidy. so purposeful. π
π¦ ARGUMENTS π¦
irqβ the interrupt number. yeah, the actual number of the interrupt. that one. π₯pβ a pointer to the poll function. like, the pollfunc gets to hang out here. bestie brought a friend π
π DESCRIPTION π
okay so here's the tea β β on a trigger event occurring, if the pollfunc is attached, then this handler gets called as a threaded interrupt (and hence it may sleep π΄). yes, it can sleep! that's the whole point of the threaded business, iykyk.
and what is she responsible for? grabbing data from the device and pushing it into the associated buffer. that's literally it. she grabs, she pushes, she leaves. main character energy fr fr π
π RETURN π
IRQ_HANDLED β that's it. she handled it. periodt. π
ngl there is exactly one return value listed here, so don't @ me about edge cases, this is what the page says π«Ά
π§ SEE ALSO π§
the whole friend group, no cap:
- Kernel file
./drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c cros_ec_sensors_core_init(9)cros_ec_sensors_core_register(9)cros_ec_motion_send_host_cmd(9)cros_ec_sensors_idx_to_reg(9)cros_ec_sensors_read_until_not_busy(9)cros_ec_sensors_read_data_unsafe(9)cros_ec_sensors_read_lpc(9)cros_ec_sensors_read_cmd(9)cros_ec_sensors_core_read(9)cros_ec_sensors_core_read_avail(9)cros_ec_sensors_core_write(9)
go read them, they're all slay, you'll be obsessed π
and that's the page!! cute little sign-off time: this one comes from ./drivers/iio/common/cros_ec_s... and the date on it is October 2026, all wrapped up as cros_ec_sensors_capture(9) πΈπ mwah, go read some kernel source, ily π«Άβ
π¦ 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