cros_ec_sen...ore_register(9)
π cros_ec_sen...ore_register β Kernel API Manual β¨
okay so bestie, buckle up, because this is the full name: cros_ec_sensors_core_register π¦. It's a kernel API manual page, and no, the truncated title in the header isn't a glitch, that's just how the page name got cut off, iykyk.
πΈ NAME πΈ
cros_ec_sensors_core_register β register a callback to FIFO and IIO when the sensor is ready. The way this one works: you have to call it at the very end of the sensor probe routine. Like, the end end. Periodt. π
β¨ SYNOPSIS β¨
int cros_ec_sensors_core_register (struct device *dev , struct iio_dev
*indio_dev , cros_ec_sensorhub_push_data_cb_t push_data );
π ARGUMENTS π
devβ the device that got created for the sensor, bestie. It's giving "who am I" energy. π«Άindio_devβ the iio device structure of the device. Yes, that's literally what it is, no notes. πpush_dataβ the function you hand over, and it gets called whencros_ec_sensorhubreceives a sample for that sensor. So basically your callback gets pinged whenever there's tea to spill. π₯
π₯ RETURN π₯
0 on success, -errno on failure. That's it, that's the whole vibe check. π
ngl if you're getting a -errno back, something did not slay. Check your args, bestie.
π¦ SEE ALSO π¦
- Kernel file
./drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.cβ go read the source, it literally ate π cros_ec_sensors_core_init(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_capture(9)cros_ec_sensors_core_read(9)cros_ec_sensors_core_read_avail(9)cros_ec_sensors_core_write(9)
okay that's the whole page, bestie, you're officially educated π. This lil masterpiece lives at ./drivers/iio/common/cros_ec_s... and it's dated October 2026, and the header/footer keeps saying cros_ec_sen...ore_register(9) because truncation is just her main character trait. mwah πβ¨
π¦ 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