of_property_read_u8_array(9)
π¦ of_property_read_u8_array(9) π¦
okay so this is a page from the Kernel API Manual, and honestly? it's a little icon of a function. let's get into it β¨
πΈ NAME πΈ
of_property_read_u8_array β find a property and read an array of u8 out of it. yes bestie, an array, plural, multiple lil bytes. π
π SYNOPSIS π
int of_property_read_u8_array (const struct device_node *np , const char
*propname , u8 *out_values , size_t sz );
π ARGUMENTS π
npβ the device node you're reading the property value from. your starting point, your home base πpropnameβ the name of the property we're out here searching for, like a lil scavenger hunt πout_valuesβ pointer to the return value. heads up though: it's modified only if the return value is0. no success, no touchy πszβ how many array elements we're reading. the count. the amount. the vibe check number π«
β¨ DESCRIPTION β¨
so what it does: search for a property inside a device node and read 8-bit value(s) from it. that's it, that's the gig π«Ά
the dts entry of the array should look like this, literally:
property = /bits/ 8 <0x50 0x60 0x70>;
and the out_values? it's modified only if a valid u8 value can be decoded. no valid decode = no writes, periodt π
π₯ RETURN π₯
0β slay, success π-EINVALβ the property does not exist π-ENODATAβ the property exists but does not have a value π«-EOVERFLOWβ the property data isn't large enough π
π SEE ALSO π
go read these next, bestie, they're all in the kernel file ./include/linux/of.h:
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_count_strings(9)of_property_read_string_index(9)of_property_present(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, bestie, you ate that π β¨
mwah π β this one came from ./include/linux, dated October 2026, and it's still signed of_property_read_u8_array(9) because consistency is iconic π
π¦ 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