STRUCT IMX334(9)
π struct imx334 β the imx334 sensor device structure, bestie
okay so this is a page from the Kernel API Manual, section 9, and it's literally all about struct imx334 β the sensor device structure for the imx334. it's giving "one struct to rule them all" energy and honestly? iconic. let's get into it π
β¨ SYNOPSIS β¨
no cap, here's the whole thing, exactly as it is:
struct imx334 {
struct device *dev;
struct regmap *cci;
struct i2c_client *client;
struct v4l2_subdev sd;
struct media_pad pad;
struct gpio_desc *reset_gpio;
struct clk *inclk;
struct v4l2_ctrl_handler ctrl_handler;
struct v4l2_ctrl *link_freq_ctrl;
struct v4l2_ctrl *pclk_ctrl;
struct v4l2_ctrl *hblank_ctrl;
struct v4l2_ctrl *vblank_ctrl;
struct {
struct v4l2_ctrl *exp_ctrl;
struct v4l2_ctrl *again_ctrl;
};
u32 vblank;
const struct imx334_mode *cur_mode;
unsigned long link_freq_bitmap;
u32 cur_code;
};
like, look at her. so organized. so many pointers. we love a structured queen π
πΈ MEMBERS πΈ
buckle up bestie, we're going field by field β every single one, no skipping:
devβ pointer to the generic device. your main character device reference fr.cciβ the CCI register map. this is how we talk to the sensor's registers πclientβ pointer to the i2c client. yes, the i2c one. don't lose it.sdβ the V4L2 sub-device. hi subdev bestie π«Άpadβ the media pad. heads up though: only one pad supported. just the one. don't go looking for a second one, she's a one-pad gal.reset_gpioβ the sensor reset gpio. press it to reset, obviously.inclkβ the sensor input clock. the heartbeat, the metronome, the vibe β°ctrl_handlerβ the V4L2 control handler.link_freq_ctrlβ pointer to the link frequency control.pclk_ctrlβ pointer to the pixel clock control.hblank_ctrlβ pointer to the horizontal blanking control.vblank_ctrlβ pointer to the vertical blanking control.{unnamed_struct}β anonymous. yes, that's literally what we call her. she has no name but she has TWO jobs and she does both πexp_ctrlβ pointer to the exposure control.again_ctrlβ pointer to the analog gain control.
vblankβ vertical blanking, measured in lines. in lines!! πcur_modeβ pointer to the current selected sensor mode. the mode of the moment β¨link_freq_bitmapβ the menu bitmap forlink_freq_ctrl. yes, it's for that one specifically.cur_codeβ the current selected format code. what format are we in rn? this knows.
π₯ SEE ALSO π₯
the kernel file herself: ./drivers/media/i2c/imx334.c, plus her whole friend group:
struct imx334_reg_list(9)struct imx334_mode(9)to_imx334(9)imx334_update_controls(9)imx334_update_exp_gain(9)imx334_fill_pad_format(9)imx334_detect(9)imx334_parse_hw_config(9)imx334_init_controls(9)
they're all linked, they all show up together, it's a whole squad π
ok so real talk β this whole page lives at ./drivers/media/i2c, and it's dated October 2026, from the Kernel API Manual (section 9). that's the source, the version-ish, and the date, all cute and accounted for π
and that's the page, bestie. struct imx334 explained, every single field intact, nothing dropped, nothing invented. slay. periodt. πΈπ β¨
π¦ 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