STRUCT I8254(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ struct i8254(9) β€” I8254 device private data structure πŸ’œ

okay bestie, welcome to the Kernel API Manual ✨ this one's short and sweet β€” it's the private data struct for an I8254 device, and honestly? it's giving "small but mighty." let's get into it 🫢


🌸 NAME 🌸

struct i8254 β€” the I8254 device private data structure. that's it, that's the whole vibe πŸ’…


✨ SYNOPSIS ✨

here's the whole thing, no cap β€” copy it exactly, don't touch a single character:

struct i8254 {
    struct mutex lock;
    u16 preset[I8254_NUM_COUNTERS];
    u8 out_mode[I8254_NUM_COUNTERS];
    struct regmap *map;
 };

πŸŽ€ Members πŸŽ€

okay so these are the four things inside, and every single one of them matters:

  • lock β€” a synchronization lock, and its whole job is to prevent I/O race conditions. lowkey the bouncer of the struct 😀 no two things touching the hardware at once, periodt.
  • preset β€” an array of Counter Register states. yep, an array, sized I8254_NUM_COUNTERS, holding the counter states πŸ’–
  • out_mode β€” an array of mode configuration states. also sized I8254_NUM_COUNTERS β€” gotta store the mode config somewhere, and this is where πŸ¦‹
  • map β€” the Regmap for the device. literally the map, it maps, iconic behavior πŸ—ΊοΈβœ¨

🌈 SEE ALSO 🌈

go look at these, bestie, iykyk:


fr fr β€” if you're touching this struct you better be holding lock, that's the whole point of it πŸ™ˆ

and that's the page! πŸŽ€ sign-off time: this masterpiece lives in ./drivers/counter, dated October 2026, and it's struct i8254(9) all the way down πŸ’–βœ¨ slay, bye πŸ‘‘

πŸ“¦ where this page comes from