cros_ec_sens...er_push_data(9)
π cros_ec_sens...er_push_data(9) β like, the Kernel API Manual, bestie β¨
okay so real talk, we're deep in the Kernel API Manual today and the star of the show is this icon cros_ec_sensorhub_register_push_data π she's a function, she registers a callback to the hub, and honestly? main character energy. let's get into it π«Ά
πΈ NAME πΈ
cros_ec_sensorhub_register_push_data β registers the callback to the hub. that's it, that's the vibe π
β¨ SYNOPSIS β¨
int cros_ec_sensorhub_register_push_data (struct cros_ec_sensorhub
*sensorhub , u8 sensor_num , struct iio_dev *indio_dev ,
cros_ec_sensorhub_push_data_cb_t cb );
like yes bestie we're returning an int, and we're taking four whole parameters. she's thorough π
π¦ ARGUMENTS π¦
sensorhubβ the Sensor Hub object itself. ur fave. the whole point πsensor_numβ the sensor that the caller is interested in π lowkey which one we're simping for.indio_devβ theiiodevice to use when a sample arrives. she shows up when the data shows up β¨cbβ the callback to call when a sample arrives. this is the function we're literally trusting with the news π£
π DESCRIPTION π
so the callback cb is gonna be used by cros_ec_sensorhub_ring to distribute events from the EC. that's the whole plot. no cap, that's it π§
like, cros_ec_sensorhub_ring handles the event distribution era and ur callback is the one catching them. team work makes the dream work, iykyk π
π₯ RETURN π₯
0when callback is registered. slay, we love a clean success πEINVALif the sensor number is invalid or the slot already used. π yeahβ¦ that slot's taken bestie, no cap.
π SEE ALSO π
- Kernel file
./drivers/platform/chrome/cros_ec_sensorhub_ring.cβ the source material, go read her π cros_ec_sensorhub_ring_fifo_enable(9)β fifo era π«cros_ec_sensor_ring_ts_filter_update(9)β timestamp filter update, iconic behavior βcros_ec_sensor_ring_ts_filter(9)β the timestamp filter herself πΈcros_ec_sensor_ring_process_event(9)β processing events, very demure πcros_ec_sensorhub_ring_handler(9)β the ring handler, she handles it πcros_ec_sensorhub_ring_allocate(9)β allocation arc, we stan π¦cros_ec_sensorhub_ring_add(9)β adding to the ring, periodt π₯
ngl bestie, ifsensor_numis invalid or that slot is already used, you're gettingEINVALback and there's no negotiating with her π check ur numbers before u ship, fr fr.
and that's the page! π brought to u straight from ./drivers/platform/chrome, dated October 2026 β future iconic, we love to see it β¨π«Άπ
π¦ 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