of_property_count_u8_elems(9)
π of_property_count_u8_elems(9) π
okay so bestie, this one's a kernel API manual page (section 9, the kernel API section, iykyk) and it's literally just a lil baby function that counts u8 elements in a device tree property. tiny. adorable. does one job. we respect her for that π
β¨ NAME β¨
of_property_count_u8_elems β count the number of u8 elements in a property. that's it. that's the whole gig π
πΈ SYNOPSIS πΈ
int of_property_count_u8_elems (const struct device_node *np , const char *propname );
like, you hand her a node and a property name and she tells you how many u8s are in there. no cap π«Ά
π¦ ARGUMENTS π¦
npβ the device node you wanna read the property value from. main character of the operation ngl πpropnameβ the name of the property you're searching for. the little label you're gonna go hunt down π
β DESCRIPTION β
so what she does is: she searches for a property inside a device node, and then counts how many u8 elements are sitting in it. that's the vibe check. property found β count the u8s β done β¨
literally nothing else. she's not doing your taxes, she's counting bytes. respect π
π₯ RETURN π₯
- the number of elements β on success, bestie, slay π
-EINVALβ if the property does not exist, or if its length doesn't match a multiple ofu8π (yeah, that second one is a real condition, don't @ me)-ENODATAβ if the property exists but doesn't have a value π
not me getting-EINVALbecause the length wasn't a multiple ofu8... anyway. check your lengths, bestie. π
π SEE ALSO π
where she lives: kernel file ./include/linux/of.h π§
and her whole friend group, fr fr:
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_u16_elems(9)of_property_count_u32_elems(9)of_property_count_u64_elems(9)of_property_read_string_array(9)of_property_count_strings(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)
like the u16/u32/u64 versions are literally her sisters, go say hi π«Ά
that's the whole page bestie, go count some u8s πβ¨
sign-off time π this one's filed under ./include/linux, dated October 2026, and it's of_property_count_u8_elems(9) β periodt. π
π
π¦ 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