extcon_get_property(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ extcon_get_property(9) ✨

ok so this is a page from the Kernel API Manual bestie, and it's all about extcon_get_property β€” literally the function that gets you the property value of an external connector πŸ’…


🌸 NAME 🌸

extcon_get_property β€” get the property value of an external connector, no cap 🫢


⭐ SYNOPSIS ⭐

int extcon_get_property (struct extcon_dev *edev , unsigned int id ,
       unsigned int prop , union extcon_property_value *prop_val );

like… that's the whole signature, she's not that complicated πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • edev β€” the extcon device itself, the main character πŸ‘‘
  • id β€” the unique id that says which external connector we're talking about
  • prop β€” the property id, aka which extcon property you want
  • prop_val β€” the pointer where the value of the extcon property gets stored πŸ“

πŸ¦‹ DESCRIPTION πŸ¦‹

ok so listen, this is important πŸ™ˆ β€” when you're getting the property value of an external connector, the external connector has to be attached. like, that's the vibe check. if it's in a detached state, the function returns 0 without a property value. yep, no property value, nothing, just 0 and a dream 😭

also, each property has to actually be in the list of supported properties according to the extcon type. so no asking for properties that aren't on the list, bestie, it's giving "not on the guest list" πŸ’€

returns 0 if success, or an error number if it fails. periodt ✨


🌈 SEE ALSO 🌈

like, go read all of them, iykyk πŸ“šπŸ’œ


ngl the whole "returns 0 without a property value when detached" thing is the one that gets people β€” pls don't forget it 🫢

and that's the page!! this one came from ./drivers/extcon and it's dated October 2026 β€” mwah, slay, go forth and get those properties πŸ’…πŸŽ€πŸ’–

πŸ“¦ where this page comes from