v4l2_i2c_new_subdev(9)
π v4l2_i2c_new_subdev π
okay so bestie, we're in the Kernel API Manual (section 9, the kernel-api girlies) and today's main character is v4l2_i2c_new_subdev. yes it's a long name. no we're not shortening it. periodt.
β¨ NAME β¨
v4l2_i2c_new_subdev β loads an i2c module and hands you back an initialized &struct v4l2_subdev. that's the whole vibe. load module β get subdev. iconic behavior honestly π
πΈ SYNOPSIS πΈ
struct v4l2_subdev * v4l2_i2c_new_subdev (struct v4l2_device *v4l2_dev ,
struct i2c_adapter *adapter , const char *client_type , u8 addr , const
unsigned short *probe_addrs );
like, yes, that's a lot of parameters. we'll get through them together π«Ά
π ARGUMENTS π
v4l2_devβ pointer tostruct v4l2_device. your v4l2 home base, basically.adapterβ pointer tostruct i2c_adapter. the adapter we're working with, slay.client_typeβ name of the chip that's on the adapter. just the chip's name, as a string, ngl very self-explanatory of it.addrβ the I2C address. and here's the tea: if zero, it will useprobe_addrsβ so zero is your "you pick for me" energy.probe_addrsβ array with a list of address. and the important bit, lowkey a trap if you forget: the last entry at such array should beI2C_CLIENT_ENDπ¨ like a proper terminator bestie, do not skip it.
π¦ DESCRIPTION π¦
returns a struct v4l2_subdev pointer. that's it. that's the sentence. short and honestly kind of powerful β¨
π SEE ALSO π
the whole friend group, in order, no one left out:
- Kernel file
./include/media/v4l2-common.h v4l2_ctrl_query_fill(9)enum v4l2_i2c_tuner_type(9)v4l2_i2c_new_subdev_board(9)v4l2_i2c_subdev_set_name(9)v4l2_i2c_subdev_init(9)v4l2_i2c_subdev_addr(9)v4l2_i2c_tuner_addrs(9)v4l2_i2c_subdev_unregister(9)v4l2_spi_new_subdev(9)v4l2_spi_subdev_init(9)v4l2_spi_subdev_unregister(9)v4l_bound_align_image(9)v4l2_find_nearest_size_conditional(9)v4l2_find_nearest_size(9)v4l2_g_parm_cap(9)v4l2_s_parm_cap(9)enum v4l2_pixel_encoding(9)struct v4l2_format_info(9)v4l2_get_link_freq(9)v4l2_get_active_data_lanes(9)v4l2_link_freq_to_bitmap(9)devm_v4l2_sensor_clk_get(9)devm_v4l2_sensor_clk_get_legacy(9)
π reminder from your girl: thatprobe_addrsarray needsI2C_CLIENT_ENDat the end. no terminator, no party. fr fr.
and that's the page!! brought to you by ./include/media π, dated October 2026 ποΈ, shipped under the very official title v4l2_i2c_new_subdev(9) π mwah, go write some drivers bestie π§β¨
π¦ 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