drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h- Extension
.h- Size
- 2157 bytes
- Lines
- 90
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
media/v4l2-device.h
Detected Declarations
struct sun6i_csi_devicestruct sun6i_csi_capture_formatstruct sun6i_csi_capture_format_matchstruct sun6i_csi_capture_statestruct sun6i_csi_capture
Annotated Snippet
struct sun6i_csi_capture_format {
u32 pixelformat;
u8 output_format_field;
u8 output_format_frame;
bool input_yuv_seq_invert;
bool input_format_raw;
u32 hsize_len_factor;
};
struct sun6i_csi_capture_format_match {
u32 pixelformat;
u32 mbus_code;
};
#undef current
struct sun6i_csi_capture_state {
struct list_head queue;
spinlock_t lock; /* Queue and buffers lock. */
struct sun6i_csi_buffer *pending;
struct sun6i_csi_buffer *current;
struct sun6i_csi_buffer *complete;
unsigned int sequence;
bool streaming;
bool setup;
};
struct sun6i_csi_capture {
struct sun6i_csi_capture_state state;
struct video_device video_dev;
struct vb2_queue queue;
struct mutex lock; /* Queue lock. */
struct media_pad pad;
struct v4l2_format format;
};
/* Helpers */
void sun6i_csi_capture_dimensions(struct sun6i_csi_device *csi_dev,
unsigned int *width, unsigned int *height);
void sun6i_csi_capture_format(struct sun6i_csi_device *csi_dev,
u32 *pixelformat, u32 *field);
/* Format */
const
struct sun6i_csi_capture_format *sun6i_csi_capture_format_find(u32 pixelformat);
/* Capture */
void sun6i_csi_capture_configure(struct sun6i_csi_device *csi_dev);
void sun6i_csi_capture_state_update(struct sun6i_csi_device *csi_dev);
/* State */
void sun6i_csi_capture_sync(struct sun6i_csi_device *csi_dev);
void sun6i_csi_capture_frame_done(struct sun6i_csi_device *csi_dev);
/* Capture */
int sun6i_csi_capture_setup(struct sun6i_csi_device *csi_dev);
void sun6i_csi_capture_cleanup(struct sun6i_csi_device *csi_dev);
#endif
Annotation
- Immediate include surface: `media/v4l2-device.h`.
- Detected declarations: `struct sun6i_csi_device`, `struct sun6i_csi_capture_format`, `struct sun6i_csi_capture_format_match`, `struct sun6i_csi_capture_state`, `struct sun6i_csi_capture`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.