cros_ec_sen...e_read_avail(9)
π cros_ec_sen...e_read_avail(9)
okay so bestie, welcome to the Kernel API Manual β¨ β yes the title up top is cros_ec_sen...e_read_avail(9) (the kernel just loves truncating things, we don't question it π). This one's all about pulling the list of values a sensor channel can actually report. Let's get into it π«Ά
πΈ NAME πΈ
cros_ec_sensors_core_read_avail β get available values π
β¨ SYNOPSIS β¨
int cros_ec_sensors_core_read_avail (struct iio_dev *indio_dev , struct
iio_chan_spec const *chan , const int **vals , int *type , int *length ,
long mask );
π ARGUMENTS π
indio_devβ the pointer to the state information for the device, iykyk πchanβ the channel specification structure table, main character energy frvalsβ the list of available values πtypeβ the type of data returnedlengthβ the number of data returned in the arraymaskβ specifies which values to be requested (yes a mask, we love a mask) π
π₯ RETURN π₯
So what comes back? Either an error code, or one of:
IIO_AVAIL_RANGEIIO_AVAIL_LIST
like, those are the two (2) good outcomes, periodt π
π¦ SEE ALSO π¦
The kernel file lives right here, no cap:
./drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
and it's giving whole friend group β go say hi to:
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_capture(9)cros_ec_sensors_core_read(9)cros_ec_sensors_core_write(9)
k that's the whole thing bestie, go forth and read those avail values π β this page came from ./drivers/iio/common/cros_ec_s... and is dated October 2026 β (yes, the source and the date are also being dramatic and truncated, slay). mwah, bye ππ§
π¦ 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