reset_contr...ional_shared(9)
π reset_control_get_optional_shared β a love letter from the kernel API manual, section 9 π
okay so you're in the kernel API manual, section 9, and the page you clicked is reset_control_get_optional_shared(9). it's the optional bestie of reset_control_get_shared() and honestly she's so chill. let's get into it β¨
πΈ NAME πΈ
reset_control_get_optional_shared β literally just the optional version of reset_control_get_shared(). that's the whole vibe. π«Ά
π¦ SYNOPSIS π¦
struct reset_control * reset_control_get_optional_shared (struct device
*dev , const char *id );
β¨ ARGUMENTS β¨
devβ the device that's gonna get reset by the controller. she's the main character here πidβ the reset line name. yes, you gotta name her π
π₯ DESCRIPTION π₯
so this is the optional variant of reset_control_get_shared. and the "optional" part is the whole point, bestie: if the reset you asked for isn't specified in the device tree, this function returns NULL instead of throwing an error at you.
like β no drama, no error code, just NULL. it's giving "no thoughts, head empty" and honestly? iconic. π§
if you want the actual real details, go read reset_control_get_shared β this page is basically a remix of that one. no cap.
fr fr though: NULL is not an error here. don't go treating a perfectly fine optional miss like a failure, or you'll be debugging your own code at 3am π
π SEE ALSO π
kernel file ./include/linux/reset.h, plus the whole friend group:
struct reset_control_bulk_data(9)enum reset_control_flags(9)reset_control_get_exclusive(9)reset_control_bulk_get_exclusive(9)reset_control_get_exclusive_released(9)reset_control_bulk_get_exclusive_released(9)reset_control_bulk_get_optional_exclusive_released(9)reset_control_get_shared(9)reset_control_bulk_get_shared(9)reset_control_get_optional_exclusive(9)reset_control_bulk_get_optional_exclusive(9)reset_control_bulk_get_optional_shared(9)of_reset_control_get_exclusive(9)of_reset_control_get_optional_exclusive(9)of_reset_control_get_shared(9)of_reset_control_get_exclusive_by_index(9)of_reset_control_get_shared_by_index(9)devm_reset_control_get_exclusive(9)devm_reset_control_get_exclusive_deasserted(9)devm_reset_control_bulk_get_exclusive(9)devm_reset_control_get_exclusive_released(9)devm_reset_control_bulk_get_exclusive_released(9)devm_reset_control_get_optional_exclusive_released(9)devm_reset_control_bulk_get_optional_exclusive_released(9)devm_reset_control_get_shared(9)devm_reset_control_get_shared_deasserted(9)devm_reset_control_bulk_get_shared(9)devm_reset_control_bulk_get_shared_deasserted(9)devm_reset_control_get_optional_exclusive(9)devm_reset_control_get_optional_exclusive_deasserted(9)devm_reset_control_bulk_get_optional_exclusive(9)devm_reset_control_get_optional_shared(9)devm_reset_control_get_optional_shared_deasserted(9)devm_reset_control_bulk_get_optional_shared(9)devm_reset_control_get_exclusive_by_index(9)devm_reset_control_get_shared_by_index(9)
that's the whole group chat, go say hi π«Ά
and that's the page!! sourced straight from ./include/linux, dated October 2026, page reset_control_get_optional_shared(9). slay, go reset something responsibly π
βπ
π¦ 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