STRUCT RESET_CONTROL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct reset_control ✨

okay so bestie, we're in the Kernel API Manual today and the main character is literally struct reset_control β€” a reset control. yes. that's the whole vibe. it's a struct, it controls resets, it has opinions about who gets to touch which reset line. let's get into it πŸ’…


🌸 NAME 🌸

struct reset_control β€” a reset control πŸŽ€


πŸ’– SYNOPSIS πŸ’–

struct reset_control {
    struct reset_controller_dev *rcdev;
    struct srcu_struct srcu;
    struct list_head list;
    unsigned int id;
    struct kref refcnt;
    bool acquired;
    bool shared;
    bool array;
    atomic_t deassert_count;
    atomic_t triggered_count;
    struct mutex lock;
 };

no cap, that's the whole thing. every field matters, bestie, so let's go one by one 🫢


πŸ¦‹ Members πŸ¦‹

  • rcdev β€” a pointer to the reset controller device this reset control belongs to. like, this is its home. its people. its origin story ✨
  • srcu β€” protects the rcdev pointer from removal while a consumer is accessing it. it's giving bodyguard energy fr fr πŸ’€
  • list β€” list entry for the rcdev's reset controller list. it's on the list. literally on it.
  • id β€” ID of the reset controller in the reset controller device. everyone needs a name, and this is hers πŸ‘‘
  • refcnt β€” Number of gets of this reset_control. the get-counter. the popular-girl tally 🌸
  • acquired β€” Only one reset_control may be acquired for a given rcdev and id. so like... exclusive access, bestie. one at a time. no sharing, no negotiating, no "but I was here first" 😭
  • shared β€” Is this a shared (1), or an exclusive (0) reset_control? it's a whole personality test and the answers are literally 1 or 0 πŸ™ˆ
  • array β€” Is this an array of reset controls (1)? lowkey just a yes-or-no but with bool energy ✨
  • deassert_count β€” Number of times this reset line has been deasserted. keeping receipts, always πŸ“
  • triggered_count β€” Number of times this reset line has been reset. Currently only used for shared resets, which means the value will be either 0 or 1. so yeah β€” it's a 0 or a 1 and it knows it πŸ’€
  • lock β€” serializes the internals of reset_control_acquire. one at a time, bestie, we queue politely πŸŽ€

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/reset/core.c, plus the whole friend group πŸ’œ


okay that's the whole page, you ate that πŸ’…βœ¨

this masterpiece lives in ./drivers/reset, and it's dated October 2026 β€” so yes, we're reading from the future, no big deal, iconic behavior honestly πŸ¦‹πŸ‘‘πŸ’–

πŸ“¦ where this page comes from