of_property_count_strings(9)
π of_property_count_strings(9) π
okay so bestie, this is a page from the Kernel API Manual β it's about of_property_count_strings, and it lives right in ./include/linux. Let's get into it β¨
πΈ NAME πΈ
of_property_count_strings β find and return the number of strings from a multiple strings property. that's it, that's the whole job, and it does it flawlessly π
β¨ SYNOPSIS β¨
int of_property_count_strings (const struct device_node *np , const char *propname );
π ARGUMENTS π
npβ the device node from which the property value is to be read. like, this is the node we're snooping in π΅οΈββοΈpropnameβ name of the property to be searched. the thing you're looking for, bestie π
π¦ DESCRIPTION π¦
So what it does: it searches for a property in a device tree node and retrieves the number of null terminated strings contained in it. that's literally the whole vibe β you point it at a node and a property name, and it counts the strings for you π«Ά
π― RETURN π―
- the number of strings on success β slay π
-EINVALif the property does not exist-ENODATAif property does not have a value-EILSEQif the string is not null-terminated within the length of the property data
ngl those error codes are your vibe check π if you get one, the property isn't giving what you thought it was giving.
π SEE ALSO π
Kernel file ./include/linux/of.h, plus all of these icons:
of_node_init(9)of_machine_is_compatible(9)of_parse_phandle(9)of_parse_phandle_with_args(9)of_parse_phandle_with_fixed_args(9)of_parse_phandle_with_optional_args(9)of_phandle_args_equal(9)of_property_count_u8_elems(9)of_property_count_u16_elems(9)of_property_count_u32_elems(9)of_property_count_u64_elems(9)of_property_read_string_array(9)of_property_read_string_index(9)of_property_present(9)of_property_read_u8_array(9)of_property_read_u16_array(9)of_property_read_u32_array(9)of_property_read_u64_array(9)struct of_changeset_entry(9)struct of_changeset(9)of_device_is_system_power_controller(9)of_have_populated_dt(9)
and that's the whole page π§π this icon came from ./include/linux, dated October 2026, and it's officially titled of_property_count_strings(9) β mwah, bye 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