reset_control_acquire(9)
β¨ reset_control_acquire(9) β¨
okay so this is a page straight out of the Kernel API Manual and it's literally about calling dibs on a reset control π like, exclusive dibs. one consumer at a time, no sharing without the vibes being right.
πΈ NAME πΈ
reset_control_acquire β acquires a reset control for exclusive use π«Ά
β SYNOPSIS β
int reset_control_acquire (struct reset_control *rstc );
π ARGUMENTS π
rstcβ the reset control. yeah. that's the whole argument. iconic minimalism honestly β¨
π DESCRIPTION π
So bestie, here's the tea: this is the function you call when you want to explicitly acquire a reset control for exclusive use. like, explicitly. you're not just hoping nobody else touches it, you're making it official π₯
lowkey important: exclusive resets are requested as acquired by default. so if you grabbed one the normal way, congrats, it's already yours and you didn't even have to do anything π
Now β for a second consumer to be able to control that same reset, the first consumer has to release it first. no exceptions, no cap. and the easiest way to set that up? call reset_control_get_exclusive_released to obtain your instance of the reset control. resets obtained that way are not acquired by default π¦ (so you get the "released" starting state, which is exactly what you want when you're planning to share).
Now for the group-project part π§ Consumers that implement shared access to an exclusive reset have to follow a specific protocol to work together. it's giving "we all agreed on the rules in the group chat beforehand." here's the protocol:
- Before you can change a reset, you must acquire exclusive access using
reset_control_acquire. - After you're done operating the reset, you must release exclusive access with a call to
reset_control_release.
And the boundary condition, because this is the part people mess up π β consumers are not granted exclusive access to the reset as long as another consumer hasn't released a reset. so if you're waiting on it, you're waiting on it. periodt π
See also: reset_control_release π
π¦ SEE ALSO π¦
Everything in the reset-verse, fr fr:
- Kernel file
./drivers/reset/core.cπ struct reset_control(9)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_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)
and that's the whole page bestie, go acquire something exclusive π
this masterpiece lives in ./drivers/reset, it's dated October 2026, and it goes by reset_control_acquire(9) in the Kernel API Manual. mwah ππ
π¦ 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