parse_prop_cells(9)
π parse_prop_cells β like, the property parsing function for suppliers, bestie
okay so real talk: this one lives in the Kernel API Manual (section 9), and it's genuinely shorter than most of the pages in this family, so we can absolutely get through it together. grab a boba, we're parsing device tree properties. π§β¨
πΈ NAME πΈ
parse_prop_cells β Property parsing function for suppliers
like yes that's the whole name section, it's giving minimalism, we love that for it π
β¨ SYNOPSIS β¨
struct device_node * parse_prop_cells (struct device_node *np , const
char *prop_name , int index , const char *list_name , const char
*cells_name );
she returns a struct device_node * and takes five args, no cap. every single one spelled exactly like that, don't come for me π«Ά
π ARGUMENTS π
npβ Pointer to device tree node containing a list. this is the node you're digging around in, your starting point, your main character π¦prop_nameβ Name of property to be parsed. Expected to hold phandle values. so it's the property you're actually reading, and the vibes are: phandles π·οΈindexβ For properties holding a list of phandles, this is the index into the list. like, which one do you want. zero-based energy, you know the drill π’list_nameβ Property name that is known to contain list of phandle(s) to supplier(s). the supplier list property, aka where all the phandles hang out πcells_nameβ property name that specifies phandles' arguments count. it's the thing that tells you how many arguments each phandle is carrying around with it π
π₯ DESCRIPTION π₯
so the whole point: this is a helper function to parse properties that have a known fixed name and are a list of phandles and phandle arguments.
that's it. that's the description. she's a helper, she's focused, she knows what she's about. honestly iconic, no notes π
β RETURN β
here's what you actually get back, and this part is important so like, pay attention bestie π
- phandle node pointer with refcount incremented. Caller must
of_node_puton it when done. NULLif no phandle found atindex
β οΈ serious business for one sec: that refcount is incremented. you must call of_node_put on the returned node when you're done with it. that's not optional, that's not a suggestion, that's how you avoid leaking a reference. don't leave her hanging π
π¦ SEE ALSO π¦
Kernel file ./drivers/of/property.c and honestly the whole friend group:
of_property_read_bool(9)of_graph_is_present(9)of_property_count_elems_of_size(9)of_find_property_value_of_size(9)of_property_read_u8_index(9)of_property_read_u16_index(9)of_property_read_u32_index(9)of_property_read_u64_index(9)of_property_read_variable_u8_array(9)of_property_read_variable_u16_array(9)of_property_read_variable_u32_array(9)of_property_read_u64(9)of_property_read_variable_u64_array(9)of_property_read_string(9)of_property_match_string(9)of_property_read_string_helper(9)of_graph_parse_endpoint(9)of_graph_get_port_by_id(9)of_graph_get_next_port(9)of_graph_get_next_port_endpoint(9)of_graph_get_next_endpoint(9)of_graph_get_endpoint_by_regs(9)of_graph_get_remote_endpoint(9)of_graph_get_port_parent(9)of_graph_get_remote_port_parent(9)of_graph_get_remote_port(9)of_graph_get_endpoint_count(9)of_graph_get_port_count(9)of_graph_get_remote_node(9)parse_suffix_prop_cells(9)struct supplier_bindings(9)of_link_property(9)
like, that's the entire of_graph squad plus the property helpers. read them, love them, they're all on the same page (metaphorically) π«Άπ
and that's the whole page, bestie!! π sign-off time: this one comes from ./drivers/of, dated October 2026, and it's filed under parse_prop_cells(9) in the Kernel API Manual. slay, go put your nodes back. πβ¨
π¦ 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