STRUCT RESET_CONTROL(9)
β¨ 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 thercdevpointer 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 thisreset_control. the get-counter. the popular-girl tally πΈacquiredβ Only onereset_controlmay be acquired for a givenrcdevandid. 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 withboolenergy β¨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 either0or1. so yeah β it's a 0 or a 1 and it knows it πlockβ serializes the internals ofreset_control_acquire. one at a time, bestie, we queue politely π
π₯ SEE ALSO π₯
Kernel file ./drivers/reset/core.c, plus the whole friend group π
struct reset_control_array(9)struct reset_gpio_lookup(9)fwnode_reset_simple_xlate(9)reset_controller_register(9)reset_controller_unregister(9)devm_reset_controller_register(9)reset_control_reset(9)reset_control_bulk_reset(9)reset_control_rearm(9)reset_control_assert(9)reset_control_bulk_assert(9)reset_control_deassert(9)reset_control_bulk_deassert(9)reset_control_status(9)reset_control_acquire(9)reset_control_bulk_acquire(9)reset_control_release(9)reset_control_bulk_release(9)reset_control_put(9)reset_control_bulk_put(9)__device_reset(9)fwnode_reset_control_get_count(9)fwnode_reset_control_array_get(9)devm_reset_control_array_get(9)reset_control_get_count(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms