drivers/media/dvb-frontends/dib0090.c
Source file repositories/reference/linux-study-clean/drivers/media/dvb-frontends/dib0090.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/dvb-frontends/dib0090.c- Extension
.c- Size
- 77671 bytes
- Lines
- 2669
- 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/slab.hlinux/i2c.hlinux/mutex.hmedia/dvb_frontend.hdib0090.hdibx000_common.h
Detected Declarations
struct dc_calibrationstruct dib0090_tuningstruct dib0090_pllstruct dib0090_identitystruct dib0090_statestruct dib0090_fw_statestruct slopestruct dc_calibrationfunction dib0090_read_regfunction dib0090_write_regfunction dib0090_fw_read_regfunction dib0090_fw_write_regfunction dib0090_write_regsfunction dib0090_identifyfunction dib0090_fw_identifyfunction dib0090_reset_digitalfunction dib0090_fw_reset_digitalfunction dib0090_wakeupfunction dib0090_sleepfunction dib0090_dcc_freqfunction slopes_to_scalefunction dib0090_wbd_to_dbfunction dib0090_wbd_targetfunction dib0090_gain_applyfunction dib0090_set_boostfunction dib0090_set_rframpfunction dib0090_set_rframp_pwmfunction dib0090_set_bbrampfunction dib0090_set_bbramp_pwmfunction dib0090_pwm_gain_resetfunction dib0090_set_dc_servofunction dib0090_get_slow_adc_valfunction dib0090_gain_controlfunction dib0090_get_current_gainfunction dib0090_get_wbd_targetfunction dib0090_get_wbd_offsetfunction dib0090_set_switchfunction dib0090_set_vgafunction dib0090_update_rframp_7090function dib0090_set_default_configfunction dib0090_set_EFUSEfunction dib0090_resetfunction dib0090_get_offsetfunction dib0090_set_trimfunction dib0090_dc_offset_calibrationfunction dib0090_wbd_calibrationfunction dib0090_set_bandwidthfunction dib0090_update_tuning_table_7090
Annotated Snippet
struct dib0090_tuning {
u32 max_freq; /* for every frequency less than or equal to that field: this information is correct */
u8 switch_trim;
u8 lna_tune;
u16 lna_bias;
u16 v2i;
u16 mix;
u16 load;
u16 tuner_enable;
};
struct dib0090_pll {
u32 max_freq; /* for every frequency less than or equal to that field: this information is correct */
u8 vco_band;
u8 hfdiv_code;
u8 hfdiv;
u8 topresc;
};
struct dib0090_identity {
u8 version;
u8 product;
u8 p1g;
u8 in_soc;
};
struct dib0090_state {
struct i2c_adapter *i2c;
struct dvb_frontend *fe;
const struct dib0090_config *config;
u8 current_band;
enum frontend_tune_state tune_state;
u32 current_rf;
u16 wbd_offset;
s16 wbd_target; /* in dB */
s16 rf_gain_limit; /* take-over-point: where to split between bb and rf gain */
s16 current_gain; /* keeps the currently programmed gain */
u8 agc_step; /* new binary search */
u16 gain[2]; /* for channel monitoring */
const u16 *rf_ramp;
const u16 *bb_ramp;
/* for the software AGC ramps */
u16 bb_1_def;
u16 rf_lt_def;
u16 gain_reg[4];
/* for the captrim/dc-offset search */
s8 step;
s16 adc_diff;
s16 min_adc_diff;
s8 captrim;
s8 fcaptrim;
const struct dc_calibration *dc;
u16 bb6, bb7;
const struct dib0090_tuning *current_tune_table_index;
const struct dib0090_pll *current_pll_table_index;
u8 tuner_is_tuned;
u8 agc_freeze;
struct dib0090_identity identity;
u32 rf_request;
u8 current_standard;
u8 calibrate;
u32 rest;
u16 bias;
s16 temperature;
u8 wbd_calibration_gain;
const struct dib0090_wbd_slope *current_wbd_table;
u16 wbdmux;
/* for the I2C transfer */
struct i2c_msg msg[2];
u8 i2c_write_buffer[3];
u8 i2c_read_buffer[2];
struct mutex i2c_buffer_lock;
};
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/slab.h`, `linux/i2c.h`, `linux/mutex.h`, `media/dvb_frontend.h`, `dib0090.h`, `dibx000_common.h`.
- Detected declarations: `struct dc_calibration`, `struct dib0090_tuning`, `struct dib0090_pll`, `struct dib0090_identity`, `struct dib0090_state`, `struct dib0090_fw_state`, `struct slope`, `struct dc_calibration`, `function dib0090_read_reg`, `function dib0090_write_reg`.
- 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.