fwnode_get_u...rop_for_name(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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. or NULL if you'd rather just vibe with default_val πŸ™ˆ
  • name β€” the property name, used as the lookup key inside names_title. must not be NULL β€” 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 when fwnode is NULL or when props_title is 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 fwnode is NULL or props_title is empty β†’ it uses default_val
  • if props_title has exactly one element and names_title is empty β†’ that one element is the one, that's the chosen one, main character energy πŸ‘‘
  • otherwise β†’ val is set to the element at the same index where name is found in names_title
  • if name isn't found at all β†’ the function goes looking for a "default" entry in names_title and uses the corresponding value from props_title
⚠️ important bestie: when both props_title and names_title are present, they gotta have the same number of elements β€” the only exception is when props_title has 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:


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