STRUCT ICVS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct icvs(9) ✨

okay so this is a page from the Kernel API Manual and it's literally all about struct icvs β€” the Core CVS device context πŸ’– bestie this is the main character struct, the whole vibe of the CVS driver lives in here.


🌸 NAME 🌸

struct icvs β€” the Core CVS device context, aka the big central ~everything~ struct πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct icvs {
    struct i2c_client *i2c_client;
    struct delayed_work work;
    struct icvs_resp wq_resp;
    struct completion cmd_completion;
    struct mutex lock;
    struct v4l2_subdev subdev;
    struct media_pad *remote;
    struct v4l2_async_notifier notifier;
    struct v4l2_ctrl_handler ctrl_handler;
    struct v4l2_ctrl *freq_ctrl;
    struct media_pad pads[ICVS_CSI_NUM_PADS];
    u32 nr_of_lanes;
    struct device_link *ipu_link;
    enum icvs_resources res;
    struct icvs_dev_capabilities caps;
    bool prefix;
    unsigned long quirks;
    struct gpio_desc *rst;
    struct gpio_desc *req;
    struct gpio_desc *resp;
    int irq;
    wait_queue_head_t hostwake_event;
    bool hostwake_event_arg;
 };

like… she has EVERYTHING. no cap. πŸ’…


πŸŽ€ Members πŸŽ€

time for the member-by-member tour, bestie, grab a snack πŸ“

  • i2c_client β€” the I2C client. heads up: it's NULL when you're in platform-only mode πŸ™ˆ
  • work β€” delayed work used for polling device state / completion
  • wq_resp β€” the last response container, populated by the workqueue
  • cmd_completion β€” completion for all the command waiters hanging around
  • lock β€” mutex protecting command submission & shared state. respect her 🫢
  • subdev β€” the V4L2 sub-device representing the CSI bridge entity
  • remote β€” remote media pad, connected to the upstream camera sensor
  • notifier β€” async notifier for remote sensor discovery
  • ctrl_handler β€” the V4L2 control handler
  • freq_ctrl β€” (future) frequency control pointer. she's not here yet but we're obsessed with her already ⭐
  • pads β€” local media pads (sink/source)
  • nr_of_lanes β€” active CSI-2 lane count
  • ipu_link β€” PM runtime device link (IPU consumer, CVS supplier)
  • res β€” resource capability (light/full)
  • caps β€” the device protocol capabilities as reported
  • prefix β€” firmware response prefix present
  • quirks β€” device-specific quirk flags
  • rst β€” Reset GPIO (full capability only)
  • req β€” Request GPIO (ownership signaling)
  • resp β€” Response GPIO (ownership signaling)
  • irq β€” wake IRQ (full capability)
  • hostwake_event β€” waitqueue for wake events
  • hostwake_event_arg β€” the wake event flag

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/media/i2c/cvs/icvs.h, plus the whole friend group: enum icvs_csi_cmd_id(9), enum icvs_csi_link_owner(9), enum icvs_csi_privacy_status(9), enum icvs_csi_pads(9), CVS device quirk flags(9), struct icvs_device_quirk(9), struct icvs_dt_config(9), struct icvs_vc_config(9), struct icvs_link_cfg(9), struct icvs_fw_version(9), struct icvs_vid_pid(9), struct icvs_mipi_data_packet(9), struct icvs_mipi_read_packet(9), struct icvs_dev_capabilities(9), struct icvs_cmd(9), struct icvs_resp(9), enum icvs_resources(9), enum icvs_command(9), enum icvs_state(9), cvs_dev(9) πŸ’œ


ngl, if you're touching any of the above, you're gonna want this struct open in another window. iykyk πŸ”₯

that's the whole page bestie, slay πŸ’…βœ¨ this one came from ./drivers/media/i2c/cvs and it's dated October 2026 β€” periodt, go read the header file now πŸ§šπŸ’–

πŸ“¦ where this page comes from