VALID INTEGRATION TIMES (IT)(9)
π DESCRIPTION
ok so bestie, listen: there's this thing called static const int veml6046x00_it and it's literally just holding the array with all the valid IT π
that's it, that's the whole array.
and here's the slay part β¨ β the register value you read or write in regmap_field it on veml6046x00 is identical to the array index. like, same number, no cap. so there's no separate translation table between valid integration times and register values needed at all β the index of the array is the register value. iconic behavior honestly, we love a 1:1 mapping π«Ά
also the array is already in the exact form expected by the callback of the sysfs attribute integration_time_available (IIO_CHAN_INFO_INT_TIME), so there's no additional conversion needed either. zero extra steps, we ate π₯
fr fr the whole flex here is that nothing needs translating. index = register value, array shape = callback shape. done. π
π SEE ALSO
- Kernel file
./drivers/iio/light/veml6046x00.c struct veml6046x00_rf(9)struct veml6046x00_data(9)- Handling of gain and photodiode size (PD)(9)
struct veml6046x00_gain_pd(9)- Factors for calculation of lux(9)
veml6046x00_read_data_ready(9)veml6046x00_wait_data_available(9)
ok that's the whole page bestie, go read the kernel source and hydrate πβ¨
mwah π β this little number lives in ./drivers/iio/light, dated October 2026, part of the Kernel API Manual, section 9 (that's the "IT" girlies, valid integration times, obviously π§)
π¦ 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