v4l2_ctrl_ptr_create(9)
π v4l2_ctrl_ptr_create β the Kernel API Manual page you didn't know you needed π
okay so bestie, welcome to section 9 of the Kernel API Manual πΈ this one is genuinely short and sweet β it's one of those lil helper functions that's like two lines of code but saves you a cast that would otherwise make you cry. no cap.
β¨ NAME β¨
v4l2_ctrl_ptr_create β the helper function that hands you back a v4l2_ctrl_ptr when all you've got is a void pointer π«Ά
like, it literally does the type-pun for you so you don't have to. it's giving "small but essential". π
π SYNOPSIS π
union v4l2_ctrl_ptr v4l2_ctrl_ptr_create (void *ptr );
that's it. that's the whole vibe. one argument in, one union out. π₯
π¦ ARGUMENTS π¦
ptrβ The void pointer π« (yes, that's genuinely all the docs say, and honestly? iconic. it's just the void pointer, the one you're wrapping up into the union.)
π SEE ALSO π
bestie, this is the part where the manpage just. goes. off. like it's a whole group chat of related symbols and we're tagging everyone. the kernel file in question is ./include/media/v4l2-ctrls.h, and everything below lives in that same universe:
the actual types & structs π
union v4l2_ctrl_ptr(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)
handler setup & lifetime energy π§
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)
making new controls (the main character section) β
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)
activation, grabbing, tweaking πΈ
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)
names & menus π
getters and setters, aka the whole point π₯
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)
merging, logging, polling π
v4l2_ctrl_replace(9)v4l2_ctrl_merge(9)v4l2_ctrl_log_status(9)v4l2_ctrl_subscribe_event(9)v4l2_ctrl_poll(9)
request API squad π
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)
the classic ioctl-adjacent crew (iykyk) π
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)
subdev & fwnode goodies π
v4l2_ctrl_subdev_subscribe_event(9)v4l2_ctrl_subdev_log_status(9)v4l2_ctrl_new_fwnode_properties(9)
the type ops (lowkey the real MVPs) π§
v4l2_ctrl_type_op_equal(9)v4l2_ctrl_type_op_init(9)v4l2_ctrl_type_op_log(9)v4l2_ctrl_type_op_validate(9)
ngl that SEE ALSO list is longer than the function itself, but every single one of those is a real reference from the original page so we keep them ALL. no skips, no summarising, periodt. π
and that's the whole page, bestie!! told you it was short π«Ά this cutie comes to you from ./include/media, dated October 2026, and it lives in the Kernel API Manual as v4l2_ctrl_ptr_create(9) β go forth and cast 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