STRUCT PART_ID_GTS_MULTIPLIER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

struct part_id_gts_multiplier β€” bestie, it's literally the part number and its matching gts multiplier, wrapped up in one little struct πŸŽ€


✨ SYNOPSIS ✨

struct part_id_gts_multiplier {
    int part_id;
    int max_scale_int;
    int max_scale_nano;
 };
ok so that closing brace has a little extra space before it in the source β€” iconic of it, no notes, we keep it exactly as-is 🫢

🧚 Members 🧚

  • part_id β€” the Part ID of the device. like, which device are we even talking about, y'know? this is the answer 🌸
  • max_scale_int β€” the Multiplier for iio_init_iio_gts. the integer half of the vibe πŸ’œ
  • max_scale_nano β€” also a Multiplier for iio_init_iio_gts. the nano half of the vibe ✨

πŸ¦‹ Description πŸ¦‹

So. GTS stands for Gain Time Scale, and it's a set of helper functions for Light sensors 🌈 β€” and here's the thing, bestie: these sensors don't just have hardware gains, they also have gains associated with Integration times. both. at once. main character energy fr fr πŸ‘‘

There are two variants of the device, and they have slightly different characteristics β€” but (and this is the plot twist 😭) they have the same ADC count for different Lux levels, just like it says in the datasheet. no cap.

This multiplier array is what stores the derived Lux per count value for those two variants, so the GTS helper functions can come along and use it. that's the whole job. it holds the numbers, it slays, it goes home πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/iio/light/apds9306.c β€” with struct apds9306_regfields(9) and struct apds9306_data(9), the whole friend group 🫢

ok that's the whole page, go read the kernel source bestie, mwah πŸ’–

source vibe check: ./drivers/iio/light Β· dated October 2026 Β· Kernel API Manual ✨ thanks for coming to my ted talk, ily, bye πŸ‘‘

πŸ“¦ where this page comes from