of_icc_get_by_index(9)
π of_icc_get_by_index β Kernel API Manual β¨
okay so bestie, buckle up, because we're diving into of_icc_get_by_index(9) β that's the one from the Kernel API Manual, and it's honestly giving "quiet little helper that does a lot of heavy lifting" energy π«Ά
πΈ NAME πΈ
of_icc_get_by_index β get a path handle from a DT node based on index β
π SYNOPSIS π
struct icc_path * of_icc_get_by_index (struct device *dev , int idx );
like, that's the whole signature, no cap π
π¦ ARGUMENTS π¦
devβ device pointer for the consumer device. this is the one doing the consuming, iykyk πidxβ interconnect path index. literally just the index, bestie π’
β¨ DESCRIPTION β¨
okay so picture this: this function goes looking for a path between two endpoints, and when it finds one β slay β it hands you back an icc_path handle. mission accomplished π
when you're done with your constraints and don't need them anymore? use icc_put to release them. that's the cleanup era, don't skip it π§Ή
now here's the fun part: if the interconnect API is disabled, this thing returns NULL and your consumer drivers will still build. iconic, honestly. lowkey it means drivers are free to handle that case specifically if they want to β but they don't have to. no pressure, main character energy π
π₯ RETURN π₯
- an
icc_pathpointer on success π ERR_PTRon error πNULLwhen the API is disabled or when the"interconnects"DT property is missing π
fr fr, check for that NULL β it's not always an error, sometimes it's just vibe check failed π«Ά
π SEE ALSO π
Kernel file ./drivers/interconnect/core.c, plus the whole squad:
of_icc_get_from_provider(9)of_icc_get(9)icc_get(9)icc_set_tag(9)icc_get_name(9)icc_set_bw(9)icc_put(9)icc_node_create_dyn(9)icc_node_create(9)icc_node_destroy(9)icc_node_set_name(9)icc_link_nodes(9)icc_link_create(9)icc_node_add(9)icc_node_del(9)icc_nodes_remove(9)icc_provider_init(9)icc_provider_register(9)icc_provider_deregister(9)
aaand that's the page, bestie π this one's filed under ./drivers/interconnect, dated October 2026, and it's literally called of_icc_get_by_index(9) β go forth and get those path handles πβ¨π
π¦ 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