Path: blob/master/drivers/media/dvb/frontends/dib0070.h
15112 views
/*1* Linux-DVB Driver for DiBcom's DiB0070 base-band RF Tuner.2*3* Copyright (C) 2005-7 DiBcom (http://www.dibcom.fr/)4*5* This program is free software; you can redistribute it and/or6* modify it under the terms of the GNU General Public License as7* published by the Free Software Foundation, version 2.8*/9#ifndef DIB0070_H10#define DIB0070_H1112struct dvb_frontend;13struct i2c_adapter;1415#define DEFAULT_DIB0070_I2C_ADDRESS 0x601617struct dib0070_wbd_gain_cfg {18u16 freq;19u16 wbd_gain_val;20};2122struct dib0070_config {23u8 i2c_address;2425/* tuner pins controlled externally */26int (*reset) (struct dvb_frontend *, int);27int (*sleep) (struct dvb_frontend *, int);2829/* offset in kHz */30int freq_offset_khz_uhf;31int freq_offset_khz_vhf;3233u8 osc_buffer_state; /* 0= normal, 1= tri-state */34u32 clock_khz;35u8 clock_pad_drive; /* (Drive + 1) * 2mA */3637u8 invert_iq; /* invert Q - in case I or Q is inverted on the board */3839u8 force_crystal_mode; /* if == 0 -> decision is made in the driver default: <24 -> 2, >=24 -> 1 */4041u8 flip_chip;42u8 enable_third_order_filter;43u8 charge_pump;4445const struct dib0070_wbd_gain_cfg *wbd_gain;4647u8 vga_filter;48};4950#if defined(CONFIG_DVB_TUNER_DIB0070) || (defined(CONFIG_DVB_TUNER_DIB0070_MODULE) && defined(MODULE))51extern struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg);52extern u16 dib0070_wbd_offset(struct dvb_frontend *);53extern void dib0070_ctrl_agc_filter(struct dvb_frontend *, u8 open);54extern u8 dib0070_get_rf_output(struct dvb_frontend *fe);55extern int dib0070_set_rf_output(struct dvb_frontend *fe, u8 no);56#else57static inline struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg)58{59printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);60return NULL;61}6263static inline u16 dib0070_wbd_offset(struct dvb_frontend *fe)64{65printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);66return 0;67}6869static inline void dib0070_ctrl_agc_filter(struct dvb_frontend *fe, u8 open)70{71printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);72}73#endif7475#endif767778