1#ifndef DIB9000_H 2#define DIB9000_H 3 4#include "dibx000_common.h" 5 6struct dib9000_config { 7 u8 dvbt_mode; 8 u8 output_mpeg2_in_188_bytes; 9 u8 hostbus_diversity; 10 struct dibx000_bandwidth_config *bw; 11 12 u16 if_drives; 13 14 u32 timing_frequency; 15 u32 xtal_clock_khz; 16 u32 vcxo_timer; 17 u32 demod_clock_khz; 18 19 const u8 *microcode_B_fe_buffer; 20 u32 microcode_B_fe_size; 21 22 struct dibGPIOFunction gpio_function[2]; 23 struct dibSubbandSelection subband; 24 25 u8 output_mode; 26}; 27 28#define DEFAULT_DIB9000_I2C_ADDRESS 18 29 30#if defined(CONFIG_DVB_DIB9000) || (defined(CONFIG_DVB_DIB9000_MODULE) && defined(MODULE)) 31extern struct dvb_frontend *dib9000_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, const struct dib9000_config *cfg); 32extern int dib9000_i2c_enumeration(struct i2c_adapter *host, int no_of_demods, u8 default_addr, u8 first_addr); 33extern struct i2c_adapter *dib9000_get_tuner_interface(struct dvb_frontend *fe); 34extern struct i2c_adapter *dib9000_get_i2c_master(struct dvb_frontend *fe, enum dibx000_i2c_interface intf, int gating); 35extern int dib9000_set_gpio(struct dvb_frontend *fe, u8 num, u8 dir, u8 val); 36extern int dib9000_fw_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff); 37extern int dib9000_fw_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff); 38extern int dib9000_firmware_post_pll_init(struct dvb_frontend *fe); 39extern int dib9000_set_slave_frontend(struct dvb_frontend *fe, struct dvb_frontend *fe_slave); 40extern int dib9000_remove_slave_frontend(struct dvb_frontend *fe); 41extern struct dvb_frontend *dib9000_get_slave_frontend(struct dvb_frontend *fe, int slave_index); 42extern struct i2c_adapter *dib9000_get_component_bus_interface(struct dvb_frontend *fe); 43extern int dib9000_set_i2c_adapter(struct dvb_frontend *fe, struct i2c_adapter *i2c); 44extern int dib9000_fw_set_component_bus_speed(struct dvb_frontend *fe, u16 speed); 45#else 46static inline struct dvb_frontend *dib9000_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib9000_config *cfg) 47{ 48 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 49 return NULL; 50} 51 52static inline struct i2c_adapter *dib9000_get_i2c_master(struct dvb_frontend *fe, enum dibx000_i2c_interface intf, int gating) 53{ 54 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 55 return NULL; 56} 57 58static inline int dib9000_i2c_enumeration(struct i2c_adapter *host, int no_of_demods, u8 default_addr, u8 first_addr) 59{ 60 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 61 return -ENODEV; 62} 63 64static inline struct i2c_adapter *dib9000_get_tuner_interface(struct dvb_frontend *fe) 65{ 66 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 67 return NULL; 68} 69 70static inline int dib9000_set_gpio(struct dvb_frontend *fe, u8 num, u8 dir, u8 val) 71{ 72 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 73 return -ENODEV; 74} 75 76static inline int dib9000_fw_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff) 77{ 78 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 79 return -ENODEV; 80} 81 82static inline int dib9000_fw_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff) 83{ 84 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 85 return -ENODEV; 86} 87 88static inline int dib9000_firmware_post_pll_init(struct dvb_frontend *fe) 89{ 90 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 91 return -ENODEV; 92} 93 94static inline int dib9000_set_slave_frontend(struct dvb_frontend *fe, struct dvb_frontend *fe_slave) 95{ 96 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 97 return -ENODEV; 98} 99 100int dib9000_remove_slave_frontend(struct dvb_frontend *fe) 101{ 102 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 103 return -ENODEV; 104} 105 106static inline struct dvb_frontend *dib9000_get_slave_frontend(struct dvb_frontend *fe, int slave_index) 107{ 108 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 109 return NULL; 110} 111 112static inline struct i2c_adapter *dib9000_get_component_bus_interface(struct dvb_frontend *fe) 113{ 114 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 115 return NULL; 116} 117 118static inline int dib9000_set_i2c_adapter(struct dvb_frontend *fe, struct i2c_adapter *i2c) 119{ 120 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 121 return -ENODEV; 122} 123 124static inline int dib9000_fw_set_component_bus_speed(struct dvb_frontend *fe, u16 speed) 125{ 126 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 127 return -ENODEV; 128} 129#endif 130 131#endif 132