STRUCT APDS9306_DATA(9)
π struct apds9306_data(9) π
okay so bestie, this is a page straight out of the Kernel API Manual, and it's literally the whole personality of struct apds9306_data β the private data and the register definitions for the apds9306 driver. it's giving "backstage pass to the light sensor" energy. let's go π¦
β¨ NAME β¨
struct apds9306_data β apds9306 private data and registers definitions. that's it, that's the vibe π
πΈ SYNOPSIS πΈ
struct apds9306_data {
struct device *dev;
struct iio_gts gts;
struct mutex mutex;
struct regmap *regmap;
struct apds9306_regfields rf;
int read_data_available;
};
look at her. six fields. icon behavior only π
π Members π
here's the friend group, member by member π«Ά
devβ Pointer to the device structure. the main character of the struct, fr fr π«gtsβ IIO Gain Time Scale structure. gain and time scale living rent free in here β¨mutexβ Lock for protecting adc reads, device settings changes where some calculations are required before or after setting or getting the raw settings values from regmap writes or reads respectively. no cap, she's the bouncer πͺ β she keeps the ADC reads and the settings changes from stepping on each other, and she's specifically holding it down whenever some calculations have to happen before or after you set or get the raw settings values from regmap writes or reads respectively.regmapβ Regmap structure pointer. just a pointer, but she's important πrfβ Regmap register fields structure. the register fields, all cozy in one struct πread_data_availableβ Flag set by IRQ handler for ADC data available. the IRQ handler flips this one to say "bestie, the ADC data is here" π₯
ngl, that mutex description is a whole paragraph and i respect it β iykyk π
π¦ SEE ALSO π¦
- Kernel file
./drivers/iio/light/apds9306.cstruct part_id_gts_multiplier(9),struct apds9306_regfields(9)
go read those too, they're literally the supporting cast π
and that's a wrap, bestie π this little gem comes to you from ./drivers/iio/light, dated October 2026, and the page itself is struct apds9306_data(9). slay, stan, read the source π
β¨πΈ
π¦ 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