STRUCT QUAD8(9)
β¨ struct quad8(9) β¨
okay so bestie, welcome to the struct quad8(9) glow-up π
this is a page from the Kernel API Manual, and it's literally just one struct β but she's that girl. it's the device private data structure, aka the little backpack this driver carries around for every quad8 device it babysits. π
πΈ NAME πΈ
struct quad8 β the device private data structure. that's it. that's the whole vibe. she holds the state, she holds the regmap, she holds the counters. queen behavior honestly π
π¦ SYNOPSIS π¦
struct quad8 {
spinlock_t lock;
u8 cmr[QUAD8_NUM_COUNTERS];
u8 ior[QUAD8_NUM_COUNTERS];
u8 idr[QUAD8_NUM_COUNTERS];
unsigned int fck_prescaler[QUAD8_NUM_COUNTERS];
unsigned int preset[QUAD8_NUM_COUNTERS];
unsigned int cable_fault_enable;
struct regmap *map;
};
no cap, that's the whole thing. every field below gets its own lil moment β¨
π Members π
lockβ aspinlock_tthat keeps the device states from getting clobbered during R/W ops π like, bestie, we are not letting two writers fight over the same registers. not on her watch. πcmrβ array of Counter Mode Register states. one entry per counter, all cozy in there. πiorβ array of Input / Output Control Register states. same deal, array energy,QUAD8_NUM_COUNTERSwide. π§idrβ array of Index Control Register states. yup, another array. she collects them. it's her thing. πfck_prescalerβ array of filter clock prescaler configurations.unsigned int, one per counter. the timing vibes β¨presetβ array of preset values.unsigned intagain. those starting numbers live here πcable_fault_enableβ differential encoder cable status enable configurations. a singleunsigned int, no array, she's a solo act. πmapβ theregmapfor the device. this is the main-character field, fr fr β it's how we actually talk to the hardware π₯π
lowkey important: the arrays are all sized with QUAD8_NUM_COUNTERS, so don't go indexing past that π that's not a vibe check you want to fail.
π SEE ALSO π
- Kernel file
./drivers/counter/104-quad-8.cβ go read the source, bestie, iykyk π«Ά
and that's the page!! sourced fresh from ./drivers/counter, dated October 2026, and yes it's giving vintage-future manual energy ππ mwah, slay, go forth and read your structs ππ
π¦ 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