v4l2_fwnode_...tor_add_link(9)
π v4l2_fwnode_connector_add_link β the kernel API manual, bestie edition π
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 toremote_nodeandlocal_nodemust 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 callv4l2_fwnode_connector_free. don't forget, bestie, fr fr. π§
β RETURN β
- π«Ά
0on success, or a negative error code on failure:-EINVALiffwnodeorconnectoris invalid, or the connector type is unknown π«-ENOMEMon link memory allocation failure π (the memory said no)-ENOTCONNif the remote connector device can't be found π-ENOLINKif link parsing between the v4l2 (sub)dev and the connector fails π
π SEE ALSO π
everything else in this friend group β go read these, iykyk:
- Kernel file
./include/media/v4l2-fwnode.h struct v4l2_fwnode_endpoint(9)V4L2_FWNODE_PROPERTY_UNSET(9)enum v4l2_fwnode_orientation(9)struct v4l2_fwnode_device_properties(9)struct v4l2_fwnode_link(9)enum v4l2_connector_type(9)struct v4l2_connector_link(9)struct v4l2_fwnode_connector_analog(9)struct v4l2_fwnode_connector(9)enum v4l2_fwnode_bus_type(9)v4l2_fwnode_endpoint_parse(9)v4l2_fwnode_endpoint_free(9)v4l2_fwnode_endpoint_alloc_parse(9)v4l2_fwnode_parse_link(9)v4l2_fwnode_put_link(9)v4l2_fwnode_connector_free(9)v4l2_fwnode_connector_parse(9)v4l2_fwnode_device_parse(9)
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
- 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