ssam_nf_refcount_enable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ssam_nf_refcount_enable(9) β€” bestie edition ✨

Okay so real talk, this is the manual page for ssam_nf_refcount_enable(9) and it's lowkey iconic. No cap, it's giving "tiny function, big responsibilities" and I'm obsessed. Let's get into it 🫢


🌸 NAME 🌸

ssam_nf_refcount_enable β€” Enable event for reference count entry if it has not already been enabled.

(Yes bestie, that's the whole job. It's a vibe check for your reference counts πŸ’–)


✨ SYNOPSIS ✨

int ssam_nf_refcount_enable (struct ssam_controller *ctrl ,
                             struct ssam_nf_refcount_entry *entry ,
                             u8 flags );

Not me formatting this so cleanly 😭 it's literally art.


πŸŽ€ ARGUMENTS πŸŽ€

  • ctrl β€” The controller to enable the event on. Your main character, the one calling the shots πŸ‘‘
  • entry β€” The reference count entry for the event to be enabled. This is the lil record you're working with πŸ’–
  • flags β€” The flags used for enabling the event on the EC. Gotta pass these along so everything lines up ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the tea β˜•οΈ: this function enables the event associated with the given reference count entry if the reference count equals one, i.e. the event has not previously been enabled. Basically "first time? let's go πŸ’…"

But if the event has already been enabled (i.e. reference count not equal to one), it checks that the flags used for enabling match β€” and warns about this if they don't. It's giving "wait, did you use the same settings as before? bestie, consistency is key 😭"

Heads up: this does not modify the reference count itself! That's a whole separate situation, handled with ssam_nf_refcount_inc / ssam_nf_refcount_dec. Don't come for this function's job, it knows its lane 🫢

🌈 NOTE 🌈

nf->lock must be held when calling this function.

Periodt. No lock, no talk. This is non-negotiable, bestie ⭐


πŸ”₯ RETURN πŸ”₯

  • Returns zero on success πŸŽ‰
  • If the event is enabled by this call, returns the status of the event-enable EC command πŸ’«

So like, sometimes you get the simple 0, sometimes you get the actual command status. Both are valid, both are iconic.


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/platform/surface/aggregator/controller.c

And now, the whole squad, the entire friend group, the full group chat 🫢:

Like, the whole gang showed up. Love that for them πŸ’œ


🌟 Cute lil sign-off 🌟

This absolute banger comes to you from ./drivers/platform/surface/agg... (the path got cut off, but you get the vibe ✨), dated October 2026, and it's filed under ssam_nf_refcount_enable(9) in the Kernel API Manual.

Stay locked, stay enabled, and remember: nf->lock is not a suggestion, bestie πŸ’–πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from