fwnode_reset...ol_get_count(9)
π fwnode_reset_control_get_count β Kernel API Manual β¨
okay so you're in the kernel API docs (the (9) section, iykyk) and you found fwnode_reset_control_get_count. bestie, this one's actually so simple and so useful, let's go π«Ά
πΈ NAME πΈ
fwnode_reset_control_get_count β literally just counts how many resets are available with a device. that's the whole job. iconic, minimal, no notes π
β¨ SYNOPSIS β¨
int fwnode_reset_control_get_count (struct fwnode_handle *fwnode );
π ARGUMENTS π
fwnodeβ the firmware node that contains'resets'. that's the one you're counting from, bestie π¦
π DESCRIPTION π
so here's the vibe check: it returns a positive reset count on success β¨
β¦or an error number on failure, and also when the count is zero π yeah, zero doesn't get to be a happy little count here, it comes back as an error number. no cap, that's just how it is.
π₯ SEE ALSO π₯
the whole reset-control friend group, fr fr β go say hi:
- Kernel file
./drivers/reset/core.cπ (the source of truth, main character energy) 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_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_array_get(9)devm_reset_control_array_get(9)reset_control_get_count(9)β (the sibling!! the non-fwnode twin!!)
okay that's the page, mwah π this one lives in ./drivers/reset, dated October 2026, and it's part of the Kernel API Manual β go count some resets responsibly, bestie ππ
π¦ 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