STRUCT CSIS_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct csis_state(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual, section 9 β€” this page is literally all about struct csis_state, which is the driver's internal state data structure. like, it's the main character of the whole s5p-mipi-csis situation. let's get into it πŸŽ€


✨ SYNOPSIS ✨

here's the whole shape of it, bestie β€” every field, no skips:

struct csis_state {
    struct mutex lock;
    struct media_pad pads[CSIS_PADS_NUM];
    struct v4l2_subdev sd;
    u8 index;
    struct platform_device *pdev;
    struct phy *phy;
    void __iomem *regs;
    struct regulator_bulk_data supplies[CSIS_NUM_SUPPLIES];
    struct clk *clock[NUM_CSIS_CLOCKS];
    int irq;
    u32 interrupt_mask;
    u32 flags;
    u32 clk_frequency;
    u32 hs_settle;
    u32 num_lanes;
    u32 max_num_lanes;
    u8 wclk_ext;
    const struct csis_pix_format *csis_fmt;
    struct v4l2_mbus_framefmt format;
    spinlock_t slock;
    struct csis_pktbuf pkt_buf;
    struct s5pcsis_event events[S5PCSIS_NUM_EVENTS];
 };

πŸ¦‹ no cap, that's the whole vibe right there.


🌸 Members 🌸

okay now the part you actually came for β€” member by member, let's go πŸ‘‘

  • lock β€” a mutex that serializes the subdev and power management operations, and it also protects the format and flags members. it's giving bouncer at the club πŸ’…
  • pads β€” the CSIS pads array. iconic.
  • sd β€” the v4l2_subdev that's associated with this CSIS device instance.
  • index β€” the hardware instance index. which one are we, bestie?
  • pdev β€” the CSIS platform device.
  • phy β€” pointer to the CSIS generic PHY.
  • regs β€” the mmapped I/O registers memory. that's where the registers live 🏠
  • supplies β€” the CSIS regulator supplies.
  • clock β€” the CSIS clocks. plural, she's got a whole collection ⏰
  • irq β€” the requested s5p-mipi-csis irq number.
  • interrupt_mask β€” the interrupt mask of all the used interrupts.
  • flags β€” the state variable for power and streaming control. very "am i on, am i streaming" of her.
  • clk_frequency β€” the device bus clock frequency.
  • hs_settle β€” the HS-RX settle time.
  • num_lanes β€” number of MIPI-CSI data lanes used.
  • max_num_lanes β€” maximum number of MIPI-CSI data lanes supported. yes she can do more, she's just choosing not to πŸ™ˆ
  • wclk_ext β€” CSI wrapper clock: 0 - bus clock, 1 - external SCLK_CAM. two options, pick your fighter ⭐
  • csis_fmt β€” the current CSIS pixel format.
  • format β€” the common media bus format for the source and sink pad.
  • slock β€” a spinlock protecting the structure members below. she's the guard dog for the next few fields πŸ’€
  • pkt_buf β€” the frame embedded (non-image) data buffer.
  • events β€” MIPI-CSIS event (error) counters. keeping receipts on every error πŸ”₯

πŸ‘€ SEE ALSO πŸ‘€

go touch grass in these files, iykyk:

  • Kernel file ./drivers/media/platform/samsung/exynos4-is/mipi-csis.c
  • struct csis_pix_format(9)

and that's the whole page, bestie 🫢 fr fr you ate that. this lil number came to you from the source path ./drivers/media/platform/samsu... and it's dated October 2026 β€” so like, future vibes only πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from