cros_ec_sen...rocess_event(9)
β¨ cros_ec_sen...rocess_event β¨
ok so bestie, welcome to the Kernel API Manual π
this one's a lil function from the kernel's ChromeOS EC sensor hub corner of the world, and yes the name is literally cros_ec_sen...rocess_event(9) β the manpage gods truncated it, we don't ask questions, we just vibe π«Ά
πΈ NAME πΈ
cros_ec_sensor_ring_process_event β process one EC FIFO event. one. single. event. main character energy, but make it a FIFO entry π«
π¦ SYNOPSIS π¦
bool cros_ec_sensor_ring_process_event (struct cros_ec_sensorhub
*sensorhub , const struct ec_response_motion_sense_fifo_info *fifo_info
, const ktime_t fifo_timestamp , ktime_t *current_timestamp , struct
ec_response_motion_sensor_data *in , struct cros_ec_sensors_ring_sample
*out );
(it's bool, bestie β so you already know this one's gonna give you a yes or a no at the end π)
π ARGUMENTS π
sensorhubβ the Sensor Hub object. the whole vibe container, fr.fifo_infoβ FIFO information straight from the EC, and it includes thebpoint plus the EC timebase. keep that in mind, it matters later πfifo_timestampβ the EC IRQ, in kernel timebase β aka thecpoint. iconic.current_timestampβ the calculated event timestamp, kernel timebase β akaa'(yes, a-prime, we're doing math notation in here, slay π ).inβ the incoming FIFO event from the EC, and it includes theapoint in EC timebase.outβ the outgoing event headed to user space, and it includesa'. that's the whole point of the transformation, iykyk β¨
π DESCRIPTION π
Process one EC event, and add it into the ring if necessary. that's it, that's the whole job β one event in, ring gets updated when it needs to be, timestamp math happens in the background like a lil fairy doing chores π§
π₯ RETURN π₯
Returns true if the out event has been populated. so like β true means "yes queen, we filled it in", and anything else means it didn't happen. no cap π«Ά
π SEE ALSO π
- the kernel file
./drivers/platform/chrome/cros_ec_sensorhub_ring.cβ go read the source, it's giving lore cros_ec_sensorhub_register_push_data(9)cros_ec_sensorhub_ring_fifo_enable(9)cros_ec_sensor_ring_ts_filter_update(9)cros_ec_sensor_ring_ts_filter(9)cros_ec_sensorhub_ring_handler(9)cros_ec_sensorhub_ring_allocate(9)cros_ec_sensorhub_ring_add(9)
π friendly reminder: every one of those arguments keeps its exact type and meaning βstruct cros_ec_sensorhub *sensorhub,const struct ec_response_motion_sense_fifo_info *fifo_info,const ktime_t fifo_timestamp,ktime_t *current_timestamp,struct ec_response_motion_sensor_data *in,struct cros_ec_sensors_ring_sample *out. don't get cute with the pointers, that's how you get bugs π
ok that's the whole page!! mwah π this one came out of ./drivers/platform/chrome, dated October 2026, and it's part of the Kernel API Manual β so go forth, process exactly one event, and slay β¨ππ
π¦ 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