STRUCT VCNL3020_DATA(9)
β¨ struct vcnl3020_data(9) β¨
okay so bestie, we're in the Kernel API Manual today and this one is literally a struct tour, no cap π
. It's the struct vcnl3020_data page β like, all the little fields that hold the vcnl3020's whole personality. Let's get into it π«Ά
πΈ NAME πΈ
struct vcnl3020_data β vcnl3020 specific data. that's it, that's the vibe β¨
π¦ SYNOPSIS π¦
here's the whole thing in all its glory, character for character, don't touch a single brace π
struct vcnl3020_data {
struct regmap *regmap;
struct device *dev;
u8 rev;
struct mutex lock;
__be16 buf;
};
π Members π
okay these are the main characters, one by one π
regmapβ the device register map. yes, THE map. the register-y one πΊοΈdevβ the vcnl3020 device itself. iconic, obviously πrevβ the revision id. it's giving "which version are we on" energy βlockβ a lock whose whole job is protecting access to the device hardware registers. do not skip the lock, bestie, that's a whole mess waiting to happen ππbufβ a__be16buffer. big-endian, sixteen bits, living its truth π
π SEE ALSO π
- Kernel file
./drivers/iio/proximity/vcnl3020.cβ the actual source, go read it iykyk π struct vcnl3020_property(9)β the sibling page, say hi for me π«Ά
ngl the lock one is the one to remember fr fr β hardware registers don't protect themselves π
and that's the page!! mwah π this one came out of ./drivers/iio/proximity, dated October 2026, and it's filed under struct vcnl3020_data(9) β slay, go forth and be knowledgeable about sensors π§ββοΈπΈπ
π¦ 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