STRUCT CAMIF_DEV(9)
β¨ struct camif_dev(9) β¨
okay so bestie, welcome to the Kernel API Manual β specifically the page for struct camif_dev(9), and trust, this one is a whole mood. it's giving "the CAMIF driver's own private little diary" energy π
let's get into it.
π NAME π
struct camif_dev β the CAMIF driver private data structure
like, this is the driver's personal data structure. its whole personality lives in here π«Ά
π SYNOPSIS π
struct camif_dev {
struct media_device media_dev;
struct v4l2_device v4l2_dev;
struct v4l2_subdev subdev;
struct v4l2_mbus_framefmt mbus_fmt;
struct v4l2_rect camif_crop;
struct media_pad pads[CAMIF_SD_PADS_NUM];
int stream_count;
struct cam_sensor {
struct v4l2_subdev *sd;
short power_count;
short stream_count;
} sensor;
struct media_pipeline *m_pipeline;
struct v4l2_ctrl_handler ctrl_handler;
struct v4l2_ctrl *ctrl_test_pattern;
struct {
struct v4l2_ctrl *ctrl_colorfx;
struct v4l2_ctrl *ctrl_colorfx_cbcr;
};
u8 test_pattern;
u8 colorfx;
u8 colorfx_cb;
u8 colorfx_cr;
struct camif_vp vp[CAMIF_VP_NUM];
const struct s3c_camif_variant *variant;
struct device *dev;
struct s3c_camif_plat_data pdata;
struct clk *clock[CLK_MAX_NUM];
struct mutex lock;
spinlock_t slock;
void __iomem *io_base;
};
πΈ Members πΈ
time for the member-by-member vibe check. every single field, no skipping, we stan a complete list π
media_devβ top-level media device structure. the big boss of the media side of things πv4l2_devβ rootv4l2_device. the main character of the V4L2 world here β¨subdevβ the camera interface ("catchcam") subdev. yes, that's literally its nickname, iconic πmbus_fmtβ camera input media bus format. what shape the pixels are arriving in π¦camif_cropβ camera input interface crop rectangle. the crop, she is defined πpadsβ the camif subdev's media padsstream_countβ the camera interface streaming reference counter. keeping count, fr fr π₯sensorβ image sensor data structure (nestedstruct cam_sensor, with its ownsd,power_countandstream_countinside β a struct within a struct, we love a nesting moment πͺ)m_pipelineβ video entity pipeline description. the pipeline! the ~flow~ πctrl_handlerβ v4l2 control handler (owned bysubdevβ noted, so don't go thinking it's yours π)ctrl_test_patternβ theV4L2_CID_TEST_PATTERNcontrol β{unnamed_struct}β anonymous. yes bestie, an anonymous struct, it's mysterious, it's lowkey giving nothing but it's holding two very real controls πctrl_colorfxβ theV4L2_CID_COLORFXcontrolctrl_colorfx_cbcrβ theV4L2_CID_COLORFX_CBCRcontrol
test_patternβ test pattern πcolorfxβ color effect πcolorfx_cbβ Cb value forV4L2_COLORFX_SET_CBCRcolorfx_crβ Cr value forV4L2_COLORFX_SET_CBCRvpβ video path (DMA) description (codec/preview). an array of them,CAMIF_VP_NUMof them to be exact π¬variantβ variant information for this device π§devβ pointer to the CAMIF device structpdataβ a copy of the driver's platform data πclockβ clocks required for the CAMIF operation, as an array ofCLK_MAX_NUMpointers β°lockβ mutex protecting this data structure πslockβ spinlock protecting CAMIF registers π (different lock, different rules, don't mix them up)io_baseβ start address of the mmapped CAMIF registers. hi registers, we're here π«Ά
π¦ SEE ALSO π¦
- Kernel file
./drivers/media/platform/samsung/s3c-camif/camif-core.hβ go read the source bestie, it ate π struct camif_fmt(9),struct camif_dma_offset(9),struct camif_frame(9),struct s3c_camif_variant(9),struct camif_vp(9),struct camif_addr(9),struct camif_buffer(9)β the whole friend group, go say hi β¨
aaaand that's the page π this one shipped from ./drivers/media/platform/samsu... back in October 2026 β so like, mark your calendar, and go forth and stream some camera frames, bestie. no cap, you got this ππΈ
π¦ 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