STRUCT ECAP_CNT_DEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ecap_cnt_dev(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” we're looking at struct ecap_cnt_dev, which is literally the device private data structure. that's the whole vibe. it's the lil locker where this driver keeps all its stuff πŸŽ€


✨ NAME ✨

struct ecap_cnt_dev β€” the device private data structure. yes that's it, that's the name, no cap πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole shape of her, copy-pasted exactly so you don't have to squint:

struct ecap_cnt_dev {
    bool enabled;
    struct mutex lock;
    struct clk *clk;
    struct regmap *regmap;
    atomic_t nb_ovf;
    struct {
      u8 ev_mode;
      u32 time_cntr;
    } pm_ctx;
 };

look at her. iconic. main character energy fr fr πŸ‘‘


🌸 MEMBERS 🌸

okay now the member-by-member breakdown, and yes we're doing all of them, none skipped, periodt:

  • enabled β€” the device state, i.e. is she on or is she off πŸ’€
  • lock β€” the synchronization lock, there specifically to prevent I/O race conditions. do not skip the lock bestie, that's how you get chaos 🫢
  • clk β€” the device clock ⏰
  • regmap β€” the device register map πŸ—ΊοΈ
  • nb_ovf β€” the number of overflows since capture start. counting the oopsies, love that for her 😭
  • pm_ctx β€” the device context for PM operations 🧚

and because pm_ctx is a whole lil inner struct, she's got her own sub-members:

  • pm_ctx.ev_mode β€” the event mode bits ⭐
  • pm_ctx.time_cntr β€” the timestamp counter value πŸ”₯

🌈 SEE ALSO 🌈

go peek at the kernel file, that's where the lore lives:

  • Kernel file ./drivers/counter/ti-ecap-capture.c

πŸ’œ that's the whole page, no extra lore, i'm not out here inventing behaviour, that's not the vibe. everything above is exactly what the manual says, just with better energy ✨

and that's a wrap, bestie πŸŽ€ this was struct ecap_cnt_dev(9) from the ./drivers/counter corner of the world, dated October 2026 β€” go off, drink some water, and remember: lock before you race πŸ’…

πŸ“¦ where this page comes from