fwnode_get_u...rop_for_name(9)
β¨ fwnode_get_u32_prop_for_name (9) β¨
okay so bestie, welcome to the Kernel API Manual π
this one's a kernel function, section 9, and it's literally called fwnode_get_u32_prop_for_name (the header abbreviates it to fwnode_get_u...rop_for_name(9) because terminal widths are haters, but you and i know the truth π«Ά).
πΈ NAME πΈ
fwnode_get_u32_prop_for_name β find a u32 property by name, or fall back to a default value π
π SYNOPSIS π
int fwnode_get_u32_prop_for_name (struct fwnode_handle *fwnode , const
char *name , const char *props_title , const char *names_title ,
unsigned int default_val , unsigned int *val );
bestie that signature is long, drink some water before reading it π₯€
π¦ ARGUMENTS π¦
fwnodeβ pointer to a firmware node. orNULLif you'd rather just vibe withdefault_valπnameβ the property name, used as the lookup key insidenames_title. must not beNULLβ like, fr fr, do not do that πprops_titleβ name of the u32 array property that's holding the actual values πnames_titleβ name of the string array property holding the lookup keys πdefault_valβ the default value, used whenfwnodeisNULLor whenprops_titleis empty πvalβ pointer where the returned value gets stored β¨
π DESCRIPTION π
so this function goes and grabs a u32 value out of props_title, based on a name lookup in names_title. the value that lands in val gets decided like this:
- if
fwnodeisNULLorprops_titleis empty β it usesdefault_val - if
props_titlehas exactly one element andnames_titleis empty β that one element is the one, that's the chosen one, main character energy π - otherwise β
valis set to the element at the same index wherenameis found innames_title - if
nameisn't found at all β the function goes looking for a"default"entry innames_titleand uses the corresponding value fromprops_title
β οΈ important bestie: when bothprops_titleandnames_titleare present, they gotta have the same number of elements β the only exception is whenprops_titlehas exactly one element. don't make them mismatch, it's giving chaos π
β RETURN β
zero on success π β negative error on failure π
π§ SEE ALSO π§
kernel file ./drivers/phy/phy-common-props.c plus these icons:
phy_get_rx_polarity(9)phy_get_tx_polarity(9)phy_get_manual_rx_polarity(9)phy_get_manual_tx_polarity(9)
and that's the whole page, periodt π
this one lives down in ./drivers/phy, and it's dated October 2026 β so yeah, future-core of it all πΈ slay, go read some kernel source, i believe in you π«Άβ¨
π¦ 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