1#ifndef _DRXK_H_ 2#define _DRXK_H_ 3 4#include <linux/types.h> 5#include <linux/i2c.h> 6 7/** 8 * struct drxk_config - Configure the initial parameters for DRX-K 9 * 10 * adr: I2C Address of the DRX-K 11 * parallel_ts: true means that the device uses parallel TS, 12 * Serial otherwise. 13 * single_master: Device is on the single master mode 14 * no_i2c_bridge: Don't switch the I2C bridge to talk with tuner 15 * antenna_gpio: GPIO bit used to control the antenna 16 * antenna_dvbt: GPIO bit for changing antenna to DVB-C. A value of 1 17 * means that 1=DVBC, 0 = DVBT. Zero means the opposite. 18 * microcode_name: Name of the firmware file with the microcode 19 * 20 * On the *_gpio vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is 21 * UIO-3. 22 */ 23struct drxk_config { 24 u8 adr; 25 bool single_master; 26 bool no_i2c_bridge; 27 bool parallel_ts; 28 29 bool antenna_dvbt; 30 u16 antenna_gpio; 31 32 int chunk_size; 33 34 const char *microcode_name; 35}; 36 37#if defined(CONFIG_DVB_DRXK) || (defined(CONFIG_DVB_DRXK_MODULE) \ 38 && defined(MODULE)) 39extern struct dvb_frontend *drxk_attach(const struct drxk_config *config, 40 struct i2c_adapter *i2c); 41#else 42static inline struct dvb_frontend *drxk_attach(const struct drxk_config *config, 43 struct i2c_adapter *i2c) 44{ 45 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 46 return NULL; 47} 48#endif 49 50#endif 51