drivers/media/i2c/adv7604.c
Source file repositories/reference/linux-study-clean/drivers/media/i2c/adv7604.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/i2c/adv7604.c- Extension
.c- Size
- 111700 bytes
- Lines
- 3767
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/delay.hlinux/gpio/consumer.hlinux/hdmi.hlinux/i2c.hlinux/kernel.hlinux/module.hlinux/of_graph.hlinux/slab.hlinux/v4l2-dv-timings.hlinux/videodev2.hlinux/workqueue.hlinux/regmap.hlinux/interrupt.hmedia/i2c/adv7604.hmedia/cec.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-event.hmedia/v4l2-dv-timings.hmedia/v4l2-fwnode.h
Detected Declarations
struct adv76xx_reg_seqstruct adv76xx_format_infostruct adv76xx_cfg_read_infoframestruct adv76xx_chip_infostruct adv76xx_statestruct adv76xx_video_standardsstruct stdi_readbackstruct adv76xx_register_mapenum adv76xx_typefunction adv76xx_has_afefunction adv76xx_check_dv_timingsfunction htotalfunction vtotalfunction adv76xx_read_checkfunction adv76xx_write_blockfunction io_readfunction io_writefunction io_write_clr_setfunction avlink_readfunction avlink_writefunction cec_readfunction cec_writefunction cec_write_clr_setfunction infoframe_readfunction infoframe_writefunction afe_readfunction afe_writefunction rep_readfunction rep_writefunction rep_write_clr_setfunction edid_readfunction edid_writefunction edid_write_blockfunction adv76xx_set_hpdfunction adv76xx_delayed_work_enable_hotplugfunction hdmi_readfunction hdmi_read16function hdmi_writefunction hdmi_write_clr_setfunction test_writefunction cp_readfunction cp_read16function cp_writefunction cp_write_clr_setfunction vdp_readfunction vdp_writefunction adv76xx_read_regfunction adv76xx_write_reg
Annotated Snippet
struct adv76xx_reg_seq {
unsigned int reg;
u8 val;
};
struct adv76xx_format_info {
u32 code;
u8 op_ch_sel;
bool rgb_out;
bool swap_cb_cr;
u8 op_format_sel;
};
struct adv76xx_cfg_read_infoframe {
const char *desc;
u8 present_mask;
u8 head_addr;
u8 payload_addr;
};
struct adv76xx_chip_info {
enum adv76xx_type type;
bool has_afe;
unsigned int max_port;
unsigned int num_dv_ports;
unsigned int edid_enable_reg;
unsigned int edid_status_reg;
unsigned int edid_segment_reg;
unsigned int edid_segment_mask;
unsigned int edid_spa_loc_reg;
unsigned int edid_spa_loc_msb_mask;
unsigned int edid_spa_port_b_reg;
unsigned int lcf_reg;
unsigned int cable_det_mask;
unsigned int tdms_lock_mask;
unsigned int fmt_change_digital_mask;
unsigned int cp_csc;
unsigned int cec_irq_status;
unsigned int cec_rx_enable;
unsigned int cec_rx_enable_mask;
bool cec_irq_swap;
const struct adv76xx_format_info *formats;
unsigned int nformats;
void (*set_termination)(struct v4l2_subdev *sd, bool enable);
void (*setup_irqs)(struct v4l2_subdev *sd);
unsigned int (*read_hdmi_pixelclock)(struct v4l2_subdev *sd);
unsigned int (*read_cable_det)(struct v4l2_subdev *sd);
/* 0 = AFE, 1 = HDMI */
const struct adv76xx_reg_seq *recommended_settings[2];
unsigned int num_recommended_settings[2];
unsigned long page_mask;
/* Masks for timings */
unsigned int linewidth_mask;
unsigned int field0_height_mask;
unsigned int field1_height_mask;
unsigned int hfrontporch_mask;
unsigned int hsync_mask;
unsigned int hbackporch_mask;
unsigned int field0_vfrontporch_mask;
unsigned int field1_vfrontporch_mask;
unsigned int field0_vsync_mask;
unsigned int field1_vsync_mask;
unsigned int field0_vbackporch_mask;
unsigned int field1_vbackporch_mask;
};
/*
**********************************************************************
*
* Arrays with configuration parameters for the ADV7604
*
**********************************************************************
*/
struct adv76xx_state {
const struct adv76xx_chip_info *info;
struct adv76xx_platform_data pdata;
struct gpio_desc *hpd_gpio[4];
struct gpio_desc *reset_gpio;
Annotation
- Immediate include surface: `linux/delay.h`, `linux/gpio/consumer.h`, `linux/hdmi.h`, `linux/i2c.h`, `linux/kernel.h`, `linux/module.h`, `linux/of_graph.h`, `linux/slab.h`.
- Detected declarations: `struct adv76xx_reg_seq`, `struct adv76xx_format_info`, `struct adv76xx_cfg_read_infoframe`, `struct adv76xx_chip_info`, `struct adv76xx_state`, `struct adv76xx_video_standards`, `struct stdi_readback`, `struct adv76xx_register_map`, `enum adv76xx_type`, `function adv76xx_has_afe`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.