drivers/media/tuners/mxl5007t.c
Source file repositories/reference/linux-study-clean/drivers/media/tuners/mxl5007t.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/tuners/mxl5007t.c- Extension
.c- Size
- 20860 bytes
- Lines
- 915
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/i2c.hlinux/types.hlinux/videodev2.htuner-i2c.hmxl5007t.h
Detected Declarations
struct reg_pair_tstruct mxl5007t_stateenum mxl5007t_modeenum mxl5007t_chip_versionenum mxl5007t_bw_mhzfunction set_reg_bitsfunction copy_reg_bitsfunction mxl5007t_set_mode_bitsfunction mxl5007t_set_if_freq_bitsfunction mxl5007t_set_xtal_freq_bitsfunction mxl5007t_set_bw_bitsfunction mxl5007t_write_regfunction mxl5007t_write_regsfunction mxl5007t_read_regfunction mxl5007t_soft_resetfunction mxl5007t_tuner_initfunction mxl5007t_tuner_rf_tunefunction mxl5007t_synth_lock_statusfunction mxl5007t_get_statusfunction mxl5007t_set_paramsfunction mxl5007t_initfunction mxl5007t_sleepfunction mxl5007t_get_frequencyfunction mxl5007t_get_bandwidthfunction mxl5007t_get_if_frequencyfunction mxl5007t_releasefunction mxl5007t_get_chip_idexport mxl5007t_attach
Annotated Snippet
struct reg_pair_t {
u8 reg;
u8 val;
};
/* ------------------------------------------------------------------------- */
static struct reg_pair_t init_tab[] = {
{ 0x02, 0x06 },
{ 0x03, 0x48 },
{ 0x05, 0x04 },
{ 0x06, 0x10 },
{ 0x2e, 0x15 }, /* OVERRIDE */
{ 0x30, 0x10 }, /* OVERRIDE */
{ 0x45, 0x58 }, /* OVERRIDE */
{ 0x48, 0x19 }, /* OVERRIDE */
{ 0x52, 0x03 }, /* OVERRIDE */
{ 0x53, 0x44 }, /* OVERRIDE */
{ 0x6a, 0x4b }, /* OVERRIDE */
{ 0x76, 0x00 }, /* OVERRIDE */
{ 0x78, 0x18 }, /* OVERRIDE */
{ 0x7a, 0x17 }, /* OVERRIDE */
{ 0x85, 0x06 }, /* OVERRIDE */
{ 0x01, 0x01 }, /* TOP_MASTER_ENABLE */
{ 0, 0 }
};
static struct reg_pair_t init_tab_cable[] = {
{ 0x02, 0x06 },
{ 0x03, 0x48 },
{ 0x05, 0x04 },
{ 0x06, 0x10 },
{ 0x09, 0x3f },
{ 0x0a, 0x3f },
{ 0x0b, 0x3f },
{ 0x2e, 0x15 }, /* OVERRIDE */
{ 0x30, 0x10 }, /* OVERRIDE */
{ 0x45, 0x58 }, /* OVERRIDE */
{ 0x48, 0x19 }, /* OVERRIDE */
{ 0x52, 0x03 }, /* OVERRIDE */
{ 0x53, 0x44 }, /* OVERRIDE */
{ 0x6a, 0x4b }, /* OVERRIDE */
{ 0x76, 0x00 }, /* OVERRIDE */
{ 0x78, 0x18 }, /* OVERRIDE */
{ 0x7a, 0x17 }, /* OVERRIDE */
{ 0x85, 0x06 }, /* OVERRIDE */
{ 0x01, 0x01 }, /* TOP_MASTER_ENABLE */
{ 0, 0 }
};
/* ------------------------------------------------------------------------- */
static struct reg_pair_t reg_pair_rftune[] = {
{ 0x0f, 0x00 }, /* abort tune */
{ 0x0c, 0x15 },
{ 0x0d, 0x40 },
{ 0x0e, 0x0e },
{ 0x1f, 0x87 }, /* OVERRIDE */
{ 0x20, 0x1f }, /* OVERRIDE */
{ 0x21, 0x87 }, /* OVERRIDE */
{ 0x22, 0x1f }, /* OVERRIDE */
{ 0x80, 0x01 }, /* freq dependent */
{ 0x0f, 0x01 }, /* start tune */
{ 0, 0 }
};
/* ------------------------------------------------------------------------- */
struct mxl5007t_state {
struct list_head hybrid_tuner_instance_list;
struct tuner_i2c_props i2c_props;
struct mutex lock;
struct mxl5007t_config *config;
enum mxl5007t_chip_version chip_id;
struct reg_pair_t tab_init[ARRAY_SIZE(init_tab)];
struct reg_pair_t tab_init_cable[ARRAY_SIZE(init_tab_cable)];
struct reg_pair_t tab_rftune[ARRAY_SIZE(reg_pair_rftune)];
enum mxl5007t_if_freq if_freq;
u32 frequency;
u32 bandwidth;
};
/* ------------------------------------------------------------------------- */
Annotation
- Immediate include surface: `linux/i2c.h`, `linux/types.h`, `linux/videodev2.h`, `tuner-i2c.h`, `mxl5007t.h`.
- Detected declarations: `struct reg_pair_t`, `struct mxl5007t_state`, `enum mxl5007t_mode`, `enum mxl5007t_chip_version`, `enum mxl5007t_bw_mhz`, `function set_reg_bits`, `function copy_reg_bits`, `function mxl5007t_set_mode_bits`, `function mxl5007t_set_if_freq_bits`, `function mxl5007t_set_xtal_freq_bits`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: integration 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.