v4l2_ctrl_n...e_properties(9)
π
v4l2_ctrl_new_fwnode_properties(9) β from the Kernel API Manual, bestie π
okay so picture this: you're deep in the kernel, you've got a device with properties, and you need controls registered for them. That's literally this function's whole personality. Let's get into it β¨
πΈ NAME πΈ
v4l2_ctrl_new_fwnode_properties β registers controls for the device properties. That's it, that's the vibe π«Ά
β SYNOPSIS β
int v4l2_ctrl_new_fwnode_properties (struct v4l2_ctrl_handler *hdl ,
const struct v4l2_ctrl_ops *ctrl_ops , const struct
v4l2_fwnode_device_properties *p );
π¦ ARGUMENTS π¦
hdlβ pointer tostruct v4l2_ctrl_handler, aka the place you're registering these controls onto. main character energy πctrl_opsβ pointer tostruct v4l2_ctrl_ops, the ops you're registering the controls with. you gotta bring your ops, no cap.pβ pointer tostruct v4l2_fwnode_device_properties. the actual property values live here, ngl.
β¨ DESCRIPTION β¨
So what this function does: it registers controls associated to device properties, pulling the property values right out of the p parameter β but only if that property has actually been set to a value. If it's not set, it's not getting registered, periodt. π
Currently, the following v4l2 controls are parsed and registered:
V4L2_CID_CAMERA_ORIENTATIONV4L2_CID_CAMERA_SENSOR_ROTATION;
That second one has a semicolon on it, and yes I kept it exactly like that, don't come for me π
Important bestie note: controls that the caller already registered with the hdl control handler are not overwritten. So callers should register the controls they want to handle themselves before calling this function. First come, first served, fr fr. π
And if it fails? This function will set the control handler's error field on failure, exactly like the other functions that add controls to the handler do. Failure gets logged in the handler's error field, iconic consistency. π₯
π RETURN π
0 on success, a negative error code on failure. That's the whole story. π
π SEE ALSO π
Grab a snack, this list is long and we are not skipping a single one of these icons. Kernel file ./include/media/v4l2-ctrls.h union v4l2_ctrl_ptr(9), v4l2_ctrl_ptr_create(9), struct v4l2_ctrl_ops(9), struct v4l2_ctrl_type_ops(9), v4l2_ctrl_notify_fnc(9), struct v4l2_ctrl(9), struct v4l2_ctrl_ref(9), struct v4l2_ctrl_handler(9), struct v4l2_ctrl_config(9), v4l2_ctrl_fill(9), v4l2_ctrl_handler_init_class(9), v4l2_ctrl_handler_init(9), v4l2_ctrl_handler_free(9), v4l2_ctrl_lock(9), v4l2_ctrl_unlock(9), __v4l2_ctrl_handler_setup(9), v4l2_ctrl_handler_setup(9), v4l2_ctrl_handler_log_status(9), v4l2_ctrl_new_custom(9), v4l2_ctrl_new_std(9), v4l2_ctrl_new_std_menu(9), v4l2_ctrl_new_std_menu_items(9), v4l2_ctrl_new_std_compound(9), v4l2_ctrl_new_int_menu(9), v4l2_ctrl_filter(9), v4l2_ctrl_add_handler(9), v4l2_ctrl_radio_filter(9), v4l2_ctrl_cluster(9), v4l2_ctrl_auto_cluster(9), v4l2_ctrl_find(9), v4l2_ctrl_activate(9), __v4l2_ctrl_grab(9), v4l2_ctrl_grab(9), __v4l2_ctrl_modify_range(9), v4l2_ctrl_modify_range(9), __v4l2_ctrl_modify_dimensions(9), v4l2_ctrl_modify_dimensions(9), v4l2_ctrl_notify(9), v4l2_ctrl_get_name(9), v4l2_ctrl_get_menu(9), v4l2_ctrl_get_int_menu(9), v4l2_ctrl_g_ctrl(9), __v4l2_ctrl_s_ctrl(9), v4l2_ctrl_s_ctrl(9), v4l2_ctrl_g_ctrl_int64(9), __v4l2_ctrl_s_ctrl_int64(9), v4l2_ctrl_s_ctrl_int64(9), __v4l2_ctrl_s_ctrl_string(9), v4l2_ctrl_s_ctrl_string(9), __v4l2_ctrl_s_ctrl_compound(9), v4l2_ctrl_s_ctrl_compound(9), v4l2_ctrl_replace(9), v4l2_ctrl_merge(9), v4l2_ctrl_log_status(9), v4l2_ctrl_subscribe_event(9), v4l2_ctrl_poll(9), v4l2_ctrl_request_setup(9), v4l2_ctrl_request_complete(9), v4l2_ctrl_request_hdl_find(9), v4l2_ctrl_request_hdl_put(9), v4l2_ctrl_request_hdl_ctrl_find(9), v4l2_queryctrl(9), v4l2_query_ext_ctrl_to_v4l2_queryctrl(9), v4l2_query_ext_ctrl(9), v4l2_querymenu(9), v4l2_g_ctrl(9), v4l2_s_ctrl(9), v4l2_g_ext_ctrls(9), v4l2_try_ext_ctrls(9), v4l2_s_ext_ctrls(9), v4l2_ctrl_subdev_subscribe_event(9), v4l2_ctrl_subdev_log_status(9), v4l2_ctrl_type_op_equal(9), v4l2_ctrl_type_op_init(9), v4l2_ctrl_type_op_log(9), v4l2_ctrl_type_op_validate(9)
and that's the whole page, bestie!! π§ no crumbs left behind π
okay so real quick sign-off: this beauty comes from ./include/media, dated October 2026, and it's page v4l2_ctrl_n...e_properties(9) from the Kernel API Manual. go forth and register those controls, you absolute legend ππΈ
π¦ 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