drivers/media/i2c/vgxy61.c
Source file repositories/reference/linux-study-clean/drivers/media/i2c/vgxy61.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/i2c/vgxy61.c- Extension
.c- Size
- 54348 bytes
- Lines
- 1915
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/delay.hlinux/gpio/consumer.hlinux/i2c.hlinux/iopoll.hlinux/module.hlinux/pm_runtime.hlinux/regmap.hlinux/regulator/consumer.hlinux/units.hlinux/unaligned.hmedia/mipi-csi2.hmedia/v4l2-async.hmedia/v4l2-cci.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-event.hmedia/v4l2-fwnode.hmedia/v4l2-subdev.h
Detected Declarations
struct vgxy61_mode_infostruct vgxy61_fmt_descstruct vgxy61_devenum vgxy61_bin_modeenum vgxy61_hdr_modeenum vgxy61_strobe_modefunction get_bpp_by_codefunction get_data_type_by_codefunction compute_pll_parameters_by_freqfunction get_pixel_ratefunction get_chunk_sizefunction vgxy61_write_arrayfunction vgxy61_poll_regfunction vgxy61_wait_statefunction vgxy61_check_bwfunction vgxy61_apply_exposurefunction vgxy61_get_regulatorsfunction vgxy61_apply_resetfunction vgxy61_fill_framefmtfunction vgxy61_try_fmt_internalfunction vgxy61_get_selectionfunction vgxy61_enum_mbus_codefunction vgxy61_get_fmtfunction vgxy61_get_vblank_minfunction vgxy61_enum_frame_sizefunction vgxy61_update_analog_gainfunction vgxy61_apply_digital_gainfunction vgxy61_update_digital_gainfunction vgxy61_apply_patgenfunction vgxy61_update_patgenfunction vgxy61_apply_gpiox_strobe_modefunction vgxy61_update_gpios_strobe_modefunction vgxy61_update_gpios_strobe_polarityfunction vgxy61_get_expo_long_maxfunction vgxy61_update_exposurefunction vgxy61_apply_framelengthfunction vgxy61_update_vblankfunction vgxy61_apply_hdrfunction vgxy61_update_hdrfunction vgxy61_apply_settingsfunction vgxy61_stream_enablefunction vgxy61_stream_disablefunction vgxy61_s_streamfunction vgxy61_get_frame_descfunction vgxy61_set_fmtfunction vgxy61_init_statefunction vgxy61_s_ctrlfunction vgxy61_init_controls
Annotated Snippet
struct vgxy61_mode_info {
u32 width;
u32 height;
enum vgxy61_bin_mode bin_mode;
struct v4l2_rect crop;
};
struct vgxy61_fmt_desc {
u32 code;
u8 bpp;
u8 data_type;
};
static const struct vgxy61_fmt_desc vgxy61_supported_codes[] = {
{
.code = MEDIA_BUS_FMT_Y8_1X8,
.bpp = 8,
.data_type = MIPI_CSI2_DT_RAW8,
},
{
.code = MEDIA_BUS_FMT_Y10_1X10,
.bpp = 10,
.data_type = MIPI_CSI2_DT_RAW10,
},
{
.code = MEDIA_BUS_FMT_Y12_1X12,
.bpp = 12,
.data_type = MIPI_CSI2_DT_RAW12,
},
{
.code = MEDIA_BUS_FMT_Y14_1X14,
.bpp = 14,
.data_type = MIPI_CSI2_DT_RAW14,
},
{
.code = MEDIA_BUS_FMT_Y16_1X16,
.bpp = 16,
.data_type = MIPI_CSI2_DT_RAW16,
},
};
static const struct vgxy61_mode_info vgx661_mode_data[] = {
{
.width = VGX661_WIDTH,
.height = VGX661_HEIGHT,
.bin_mode = VGXY61_BIN_MODE_NORMAL,
.crop = {
.left = 0,
.top = 0,
.width = VGX661_WIDTH,
.height = VGX661_HEIGHT,
},
},
{
.width = 1280,
.height = 720,
.bin_mode = VGXY61_BIN_MODE_NORMAL,
.crop = {
.left = 92,
.top = 192,
.width = 1280,
.height = 720,
},
},
{
.width = 640,
.height = 480,
.bin_mode = VGXY61_BIN_MODE_DIGITAL_X2,
.crop = {
.left = 92,
.top = 72,
.width = 1280,
.height = 960,
},
},
{
.width = 320,
.height = 240,
.bin_mode = VGXY61_BIN_MODE_DIGITAL_X4,
.crop = {
.left = 92,
.top = 72,
.width = 1280,
.height = 960,
},
},
};
static const struct vgxy61_mode_info vgx761_mode_data[] = {
{
Annotation
- Immediate include surface: `linux/clk.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/i2c.h`, `linux/iopoll.h`, `linux/module.h`, `linux/pm_runtime.h`, `linux/regmap.h`.
- Detected declarations: `struct vgxy61_mode_info`, `struct vgxy61_fmt_desc`, `struct vgxy61_dev`, `enum vgxy61_bin_mode`, `enum vgxy61_hdr_mode`, `enum vgxy61_strobe_mode`, `function get_bpp_by_code`, `function get_data_type_by_code`, `function compute_pll_parameters_by_freq`, `function get_pixel_rate`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.