v4l2_fwnode_connector_parse(9)
π v4l2_fwnode_connector_parse β the kernel API manual, bestie edition β¨
Okay so this is a page from the Kernel API Manual, and it's all about v4l2_fwnode_connector_parse. Think of it as the glow-up ritual for a struct v4l2_fwnode_connector β you hand it a fwnode, it fills in the vibe, periodt. π«Ά
β¨ NAME β¨
v4l2_fwnode_connector_parse β initialize the struct v4l2_fwnode_connector, bestie. That's literally the whole job. π
πΈ SYNOPSIS πΈ
int v4l2_fwnode_connector_parse (struct fwnode_handle *fwnode , struct
v4l2_fwnode_connector *connector );
No cap, that's the exact signature, character for character. π
π¦ ARGUMENTS π¦
fwnodeβ pointer to the subdev endpoint's fwnode handle where the connector is connected to, or to the connector endpoint fwnode handle. Either one, your call, it's giving flexible. β¨connectorβ pointer to the V4L2 fwnode connector data structure. This is the main character getting filled in. π
π DESCRIPTION π
So the whole point: this function fills the struct v4l2_fwnode_connector with the connector type, the label, and all the enum v4l2_connector_type specific connector data. Slay. π
The label is optional, so if nobody found one, it's set to NULL. Lowkey that's just how it is. And the function initialize the links to zero β if you want to actually add links to the connector, that's a whole separate thing, you do it by calling v4l2_fwnode_connector_add_link. iykyk. π
Heads up bestie: the memory allocated for the label must be freed when no longer needed. Freeing it is done by v4l2_fwnode_connector_free. Not me letting you forget this and leak memory π β free it, fr fr.
β RETURN β
0on success, or a negative error code on failure. Simple as that. π-EINVALiffwnodeis invalid β vibe check failed, the fwnode is not it. π-ENOTCONNif the connector type is unknown or the connector device can't be found. Like, nobody's home. π
π₯ SEE ALSO π₯
Kernel file ./include/media/v4l2-fwnode.h and its whole friend group:
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_add_link(9)v4l2_fwnode_device_parse(9)
All of them, exactly as listed, no skipping the "boring" ones. We read the whole list, bestie. ππ
That's the page! π« Source location is ./include/media, dated October 2026, and it's all filed under v4l2_fwnode_connector_parse(9) β mwah, bye bestie, go initialize some connectors responsibly π§ββοΈπ
π¦ 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