v4l2_create_fwnode_links(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the Kernel API Manual ✨ β€” this is the page for v4l2_create_fwnode_links, and honestly? it's giving matchmaker energy. let's get into it 🫢


🌸 NAME 🌸

v4l2_create_fwnode_links β€” creates fwnode-based links from a source subdev to a sink subdev πŸ’–

like. it literally builds the link between two subdevices. no cap.


πŸŽ€ SYNOPSIS πŸŽ€

int v4l2_create_fwnode_links (struct v4l2_subdev *src_sd , struct
struct v4l2_subdev *sink_sd );

okay wait, typos aside, the signature is:

int v4l2_create_fwnode_links(struct v4l2_subdev *src_sd, struct v4l2_subdev *sink_sd);

two subdev pointers in, an int out. simple. iconic. periodt πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • src_sd β€” pointer to a source subdevice ✨ the one doing the sending, the main character of the relationship ngl
  • sink_sd β€” pointer to a sink subdevice 🌸 the one on the receiving end, living its best receiving life

⭐ DESCRIPTION ⭐

so what this function actually does? it goes searching for any and all fwnode endpoint connections between the source and sink subdevices, and translates them into media links πŸ”₯ literally it's out here turning firmware descriptions into actual media graph links, which is lowkey kind of a glow-up.

and here's the vibe: the sink subdevice can be the one to call this β€” in its v4l2-async notifier subdev bound callback β€” to create all the links from a bound source subdevice πŸ’œ like the sink is just out here making friends the second the source appears. obsessed.

NOTE: πŸ™ˆ any sink subdevice that calls this function must implement the .get_fwnode_pad media operation in order to verify endpoints passed to the sink are owned by the sink. no .get_fwnode_pad, no vibe check. it's mandatory bestie, don't skip it 😭

returns 0 on success, or a negative error code on failure. that's it. that's the return πŸ’€


🌈 SEE ALSO 🌈

all the media-graph besties in one place, iykyk πŸ‘‘


and that's the page!! sourced from ./include/media, dated October 2026, and titled v4l2_create_fwnode_links(9) obviously πŸŽ€ mwah, go link those subdevices, ily, bye!! πŸ§šπŸ’–

πŸ“¦ where this page comes from