tb_port_add_nfc_credits(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tb_port_add_nfc_credits(9) β€” from the Kernel API Manual, bestie πŸŽ€

okay so this one is called tb_port_add_nfc_credits and it lives in the Kernel API Manual, and honestly? it's giving "tiny function, big responsibilities" energy ✨


🌸 NAME 🌸

tb_port_add_nfc_credits β€” add/remove non flow controlled credits to a port πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

int tb_port_add_nfc_credits (struct tb_port *port , int credits );

✨ ARGUMENTS ✨

  • port β€” the port you're adding/removing NFC credits on 🫢
  • credits β€” the credits to add/remove, literally that's it πŸ’…

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea β˜• β€” this function changes the number of NFC credits allocated to port by credits. that's the whole vibe, no cap.

and the little plot twist? to remove NFC credits, you pass a negative amount of credits πŸ™ˆ like yes, we're doing signed arithmetic, it ate and left no crumbs πŸ’€


⭐ RETURN ⭐

  • 0 on success πŸ₯³
  • negative errno otherwise 😭 (that's your cue something went sideways)

🌈 SEE ALSO 🌈

Kernel file ./drivers/thunderbolt/switch.c, plus a whole friend group of functions β€” every single one, because we don't leave anyone out of the group chat 🫢:


and that's the whole page, bestie 🧚 this came from ./drivers/thunderbolt, dated October 2026, and it goes by tb_port_add_nfc_credits(9) β€” periodt πŸ’œπŸ’…

πŸ“¦ where this page comes from