v4l2_create...links_to_pad(9)
π v4l2_create_fwnode_links_to_pad π
okay bestie, welcome to the Kernel API Manual entry for v4l2_create...links_to_pad(9) β yes the name is a whole mouthful, yes it's iconic, no we're not skipping a single letter of it β¨
πΈ NAME πΈ
v4l2_create_fwnode_links_to_pad β Create fwnode-based links from a source subdev to a sink pad. That's the whole vibe: source subdev on one side, sink pad on the other, links getting made in between π
β¨ SYNOPSIS β¨
int v4l2_create_fwnode_links_to_pad (struct v4l2_subdev *src_sd , struct
media_pad *sink , u32 flags );
literally the entire signature, copy-pasted energy but make it cute π
returns an int, takes three things, we go through them right now π«Ά
π¦ ARGUMENTS π¦
src_sdβ pointer to a source subdev. yes, the source, the one doing the sourcing, main character of the connection πsinkβ pointer to a sink pad. the destination, the receiver, the one catching all the links πflagsβ the link flags. we'll get into why these have RULES in a sec, keep reading π
π§ DESCRIPTION π§
so the way this function works is: it searches for fwnode endpoint connections from a source subdevice to a single sink pad, and if suitable connections turn up, it translates them into media links to that pad. no cap, that's the whole job π
and here's the cute part β the function can be called by the sink, in its v4l2-async notifier bound callback, to create links from a bound source subdevice. so the sink is out here making its own connections, highkey independent energy π
now, the flags argument specifies the link flags. and listen, bestie, this next bit matters: The caller shall ensure that the flags are valid regardless of the number of links that may be created. For instance β setting the MEDIA_LNK_FL_ENABLED flag will cause all created links to be enabled, which isn't valid if more than one link is created. π so like, one flag, many links = chaos. do your vibe check first fr fr
β οΈ NOTE: Any sink subdevice that calls this function must implement the.get_fwnode_padmedia operation in order to verify endpoints passed to the sink are owned by the sink. no.get_fwnode_pad, no deal β that's the security guard at the door π
Return 0 on success or a negative error code on failure. zero means slay, negative means try again π
π SEE ALSO π
- Kernel file
./include/media/v4l2-mc.hv4l2_mc_create_media_graph(9) v4l_enable_media_source(9)v4l_disable_media_source(9)v4l2_create_fwnode_links(9)v4l2_pipeline_pm_get(9)v4l2_pipeline_pm_put(9)v4l2_pipeline_link_notify(9)
all the friends in the group chat, go say hi π«Άπ¦
and that's the page, bestie! sign-off time: this one lives in ./include/media, dated October 2026, from the Kernel API Manual β go forth and create those fwnode links responsibly, ily, bye ππβ¨
π¦ 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