v4l2_fwnode_...tor_add_link(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, you know how the Kernel API Manual is like, a whole vibe but also kind of a lot? yeah. this page is v4l2_fwnode_...tor_add_link(9) and it's genuinely so useful, i promise. grab a strawberry drink and let's go πŸ“


✨ NAME ✨

v4l2_fwnode_connector_add_link β€” literally just adds a link between a connector node and a v4l2-subdev node. that's it. that's the whole thing. iconic. πŸ‘‘


🌸 SYNOPSIS 🌸

int v4l2_fwnode_connector_add_link (struct fwnode_handle *fwnode ,
       struct v4l2_fwnode_connector *connector );

like, two args, no cap. so chill.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • fwnode β€” pointer to the subdev endpoint's fwnode handle where the connector is connected to. it's giving "the exact spot bestie". πŸ“
  • connector β€” pointer to the V4L2 fwnode connector data structure. that's the connector bestie we're working with πŸ’–

🌈 DESCRIPTION 🌈

so what does it actually do? okay:

Add a new struct v4l2_connector_link link to the struct v4l2_fwnode_connector connector links list. that's the main character move πŸ’…

the link's local_node points to the connector node, and the remote_node points to the host v4l2 (sub)dev. so they're linked, they're connected, they're in their era together ✨

⚠️ okay important one, listen up: the references taken to remote_node and local_node must be dropped and the allocated memory must be freed when they're no longer needed. and guess what β€” both of those things happen when you call v4l2_fwnode_connector_free. don't forget, bestie, fr fr. 🧚

⭐ RETURN ⭐

  • 🫢 0 on success, or a negative error code on failure:
    • -EINVAL if fwnode or connector is invalid, or the connector type is unknown 🚫
    • -ENOMEM on link memory allocation failure 😭 (the memory said no)
    • -ENOTCONN if the remote connector device can't be found πŸ”
    • -ENOLINK if link parsing between the v4l2 (sub)dev and the connector fails πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

everything else in this friend group β€” go read these, iykyk:


aaaand that's the page!! πŸ¦‹ this lil beauty lives in ./include/media, and it's the October 2026 edition of v4l2_fwnode_...tor_add_link(9). slay, go link some connectors, and remember to free your memory. periodt. πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from