[media] DiB0090: misc improvements

This patch adds several performance improvements and prepares the
usage of firmware-based devices.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Olivier Grenie 2011-01-04 04:27:11 -03:00 committed by Mauro Carvalho Chehab
parent b994d19268
commit 28fafca787
2 changed files with 1352 additions and 341 deletions

File diff suppressed because it is too large Load diff

View file

@ -27,6 +27,21 @@ struct dib0090_io_config {
u16 pll_int_loop_filt;
};
struct dib0090_wbd_slope {
u16 max_freq; /* for every frequency less than or equal to that field: this information is correct */
u16 slope_cold;
u16 offset_cold;
u16 slope_hot;
u16 offset_hot;
u8 wbd_gain;
};
struct dib0090_low_if_offset_table {
int std;
u32 RF_freq;
s32 offset_khz;
};
struct dib0090_config {
struct dib0090_io_config io;
int (*reset) (struct dvb_frontend *, int);
@ -47,10 +62,20 @@ struct dib0090_config {
u16 wbd_cband_offset;
u8 use_pwm_agc;
u8 clkoutdrive;
u8 ls_cfg_pad_drv;
u8 data_tx_drv;
u8 in_soc;
const struct dib0090_low_if_offset_table *low_if;
u8 fref_clock_ratio;
u16 force_cband_input;
struct dib0090_wbd_slope *wbd;
};
#if defined(CONFIG_DVB_TUNER_DIB0090) || (defined(CONFIG_DVB_TUNER_DIB0090_MODULE) && defined(MODULE))
extern struct dvb_frontend *dib0090_register(struct dvb_frontend *fe, struct i2c_adapter *i2c, const struct dib0090_config *config);
extern struct dvb_frontend *dib0090_fw_register(struct dvb_frontend *fe, struct i2c_adapter *i2c, const struct dib0090_config *config);
extern void dib0090_dcc_freq(struct dvb_frontend *fe, u8 fast);
extern void dib0090_pwm_gain_reset(struct dvb_frontend *fe);
extern u16 dib0090_get_wbd_offset(struct dvb_frontend *tuner);
@ -65,6 +90,12 @@ static inline struct dvb_frontend *dib0090_register(struct dvb_frontend *fe, str
return NULL;
}
static inline struct dvb_frontend *dib0090_fw_register(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0090_config *config)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL;
}
static inline void dib0090_dcc_freq(struct dvb_frontend *fe, u8 fast)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);