drivers/media/dvb-frontends/drxd_hard.c
Source file repositories/reference/linux-study-clean/drivers/media/dvb-frontends/drxd_hard.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/dvb-frontends/drxd_hard.c- Extension
.c- Size
- 75479 bytes
- Lines
- 2947
- 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.
- 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/kernel.hlinux/module.hlinux/moduleparam.hlinux/init.hlinux/delay.hlinux/firmware.hlinux/i2c.hasm/div64.hmedia/dvb_frontend.hdrxd.hdrxd_firm.h
Detected Declarations
struct SCfgAgcstruct SNoiseCalstruct drxd_stateenum CSCDStateenum CDrxdStateenum AGC_CTRL_MODEenum OperationModeenum app_envenum EIFFilterfunction i2c_writefunction i2c_readfunction MulDiv32function Read16function Read32function Write16function Write32function write_chunkfunction WriteBlockfunction WriteTablefunction ResetCEFRfunction InitCPfunction InitCEfunction StopOCfunction StartOCfunction InitEQfunction InitECfunction InitSCfunction InitAtomicReadfunction DRX_GetLockStatusfunction SetCfgIfAgcfunction SetCfgRfAgcfunction ReadIFAgcfunction load_firmwarefunction DownloadMicrocodefunction HI_Commandfunction HI_CfgCommandfunction InitHIfunction HI_ResetCommandfunction DRX_ConfigureI2CBridgefunction AtomicReadBlockfunction AtomicReadReg32function StopAllProcessorsfunction EnableAndResetMBfunction InitCCfunction ResetECODfunction SetCfgPgafunction InitFEfunction InitFT
Annotated Snippet
struct SCfgAgc {
enum AGC_CTRL_MODE ctrlMode;
u16 outputLevel; /* range [0, ... , 1023], 1/n of fullscale range */
u16 settleLevel; /* range [0, ... , 1023], 1/n of fullscale range */
u16 minOutputLevel; /* range [0, ... , 1023], 1/n of fullscale range */
u16 maxOutputLevel; /* range [0, ... , 1023], 1/n of fullscale range */
u16 speed; /* range [0, ... , 1023], 1/n of fullscale range */
u16 R1;
u16 R2;
u16 R3;
};
struct SNoiseCal {
int cpOpt;
short cpNexpOfs;
short tdCal2k;
short tdCal8k;
};
enum app_env {
APPENV_STATIC = 0,
APPENV_PORTABLE = 1,
APPENV_MOBILE = 2
};
enum EIFFilter {
IFFILTER_SAW = 0,
IFFILTER_DISCRETE = 1
};
struct drxd_state {
struct dvb_frontend frontend;
struct dvb_frontend_ops ops;
struct dtv_frontend_properties props;
const struct firmware *fw;
struct device *dev;
struct i2c_adapter *i2c;
void *priv;
struct drxd_config config;
int i2c_access;
int init_done;
struct mutex mutex;
u8 chip_adr;
u16 hi_cfg_timing_div;
u16 hi_cfg_bridge_delay;
u16 hi_cfg_wakeup_key;
u16 hi_cfg_ctrl;
u16 intermediate_freq;
u16 osc_clock_freq;
enum CSCDState cscd_state;
enum CDrxdState drxd_state;
u16 sys_clock_freq;
s16 osc_clock_deviation;
u16 expected_sys_clock_freq;
u16 insert_rs_byte;
u16 enable_parallel;
int operation_mode;
struct SCfgAgc if_agc_cfg;
struct SCfgAgc rf_agc_cfg;
struct SNoiseCal noise_cal;
u32 fe_fs_add_incr;
u32 org_fe_fs_add_incr;
u16 current_fe_if_incr;
u16 m_FeAgRegAgPwd;
u16 m_FeAgRegAgAgcSio;
u16 m_EcOcRegOcModeLop;
u16 m_EcOcRegSncSncLvl;
u8 *m_InitAtomicRead;
u8 *m_HiI2cPatch;
u8 *m_ResetCEFR;
u8 *m_InitFE_1;
u8 *m_InitFE_2;
u8 *m_InitCP;
u8 *m_InitCE;
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/moduleparam.h`, `linux/init.h`, `linux/delay.h`, `linux/firmware.h`, `linux/i2c.h`, `asm/div64.h`.
- Detected declarations: `struct SCfgAgc`, `struct SNoiseCal`, `struct drxd_state`, `enum CSCDState`, `enum CDrxdState`, `enum AGC_CTRL_MODE`, `enum OperationMode`, `enum app_env`, `enum EIFFilter`, `function i2c_write`.
- 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.