__of_add_property(9)
π
__of_add_property β the kernel manual, but make it make sense π
Hey bestie, so this one is a function in the kernel API manual (section 9, the kernel API girlies β¨). The star of the show is __of_add_property β and the whole point of her is literally right there in the name: she adds a property to a node without lock operations. That's it, that's the vibe. No locking, no extra drama, just vibes and a property. π
β¨ NAME β¨
__of_add_property β add a property to a node without lock operations π¦
Like, unlocked. No cap. You're on your own for the locking, bestie β this function is not doing it for you. π
πΈ SYNOPSIS πΈ
int __of_add_property (struct device_node *np , struct property *prop );
That's the whole signature, gorgeous. She takes two things and gives you back an int. Periodt. π
π ARGUMENTS π
npβ the caller's Device Node π like, it's your node, you brought it, it's your responsibility.propβ the property to add π«Ά the actual thing getting attached to the node.
π SEE ALSO π
Ok so this is the part where the manual just dumps the entire friend group on you, and honestly? Iconic. Here's everyone she's linked with, no omissions, no cap:
of_find_all_nodes(9)__of_device_is_compatible(9)of_machine_compatible_match(9)of_machine_read_compatible(9)of_machine_read_model(9)of_machine_get_match(9)of_machine_get_match_data(9)__of_device_is_available(9)__of_device_is_reserved(9)of_device_is_available(9)__of_device_is_fail(9)of_device_is_big_endian(9)of_get_parent(9)of_get_next_parent(9)of_get_next_child(9)of_get_next_child_with_prefix(9)of_get_next_available_child(9)of_get_next_reserved_child(9)of_get_next_cpu_node(9)of_get_compatible_child(9)of_get_child_by_name(9)of_get_available_child_by_name(9)of_find_node_opts_by_path(9)of_find_node_by_name(9)of_find_node_by_type(9)of_find_compatible_node(9)of_find_node_with_property(9)of_match_node(9)of_find_matching_node_and_match(9)of_alias_from_compatible(9)of_find_node_by_phandle(9)of_parse_phandle_with_args_map(9)of_count_phandle_with_args(9)of_add_property(9)of_remove_property(9)of_alias_scan(9)of_alias_get_id(9)of_alias_get_highest_id(9)of_console_check(9)of_find_next_cache_node(9)of_find_last_cache_level(9)of_map_id(9)of_map_iommu_id(9)of_map_msi_id(9)
Note the energy: __of_add_property(9) is the double-underscore unlocked version, and of_add_property(9) is right there in the list next to it, along with her bestie of_remove_property(9) π β the whole property-add/remove saga. iykyk. π₯
Also, the kernel file this lives in is ./drivers/of/base.c β that's where the magic happens. π§
β οΈ Quick vibe check, bestie: this version does not handle the locking for you. If you need lock operations, that's the other one. Don't come crying to me, I warned you. π
Kernel API Manual energy, brought to you from ./drivers/of, dated October 2026 β and the section is 9, obviously, we stay in our lane π slay, bye! π¦β¨π
π¦ 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