cros_ec_sens..._data_unsafe(9)
π NAME π
cros_ec_sensors_read_data_unsafe β bestie, this is the one that reads acceleration data straight out of EC shared memory π
β¨ SYNOPSIS β¨
int cros_ec_sensors_read_data_unsafe (struct iio_dev *indio_dev ,
unsigned long scan_mask , s16 *data );
π«Ά ARGUMENTS π«Ά
indio_devβ pointer to the IIO device, ok so this is literally your main character β¨scan_maskβ a bitmap of the sensor indices to scan, like a little guest list of which sensors get to come to the party πdataβ the location to store data, i.e. where the vibes (and the bytes) get dropped off π
π¦ DESCRIPTION π¦
Okay so this is the unsafe function for reading the EC data. And when we say unsafe we mean it β it does not guarantee that the EC will not modify the data as it is being read in π
Like, the EC can absolutely be out here changing things mid-read. No promises, no cap. It's giving "we're doing this raw and we know it" π
πΈ RETURN πΈ
0 on success, -errno on failure. Periodt π
π₯ SEE ALSO π₯
Kernel file ./drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c β go read the source, iykyk π
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_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)
π· and that's the whole page bestie π·
Signed off from ./drivers/iio/common/cros_ec_s..., dated October 2026, and yes the page you're reading is cros_ec_sens..._data_unsafe(9) β the gang's all here, love that for us π§π
π¦ 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