Adding support for MOXA ART SoC. Testing port of linux-2.6.32.60-moxart.
[linux-3.6.7-moxart.git] / drivers / media / dvb / frontends / drxk.h
blob94fecfbf14c1278d70669e18d1b5c4a7d6ebdaf7
1 #ifndef _DRXK_H_
2 #define _DRXK_H_
4 #include <linux/types.h>
5 #include <linux/i2c.h>
7 /**
8 * struct drxk_config - Configure the initial parameters for DRX-K
10 * @adr: I2C Address of the DRX-K
11 * @parallel_ts: True means that the device uses parallel TS,
12 * Serial otherwise.
13 * @dynamic_clk: True means that the clock will be dynamically
14 * adjusted. Static clock otherwise.
15 * @enable_merr_cfg: Enable SIO_PDR_PERR_CFG/SIO_PDR_MVAL_CFG.
16 * @single_master: Device is on the single master mode
17 * @no_i2c_bridge: Don't switch the I2C bridge to talk with tuner
18 * @antenna_gpio: GPIO bit used to control the antenna
19 * @antenna_dvbt: GPIO bit for changing antenna to DVB-C. A value of 1
20 * means that 1=DVBC, 0 = DVBT. Zero means the opposite.
21 * @mpeg_out_clk_strength: DRXK Mpeg output clock drive strength.
22 * @microcode_name: Name of the firmware file with the microcode
23 * @qam_demod_parameter_count: The number of parameters used for the command
24 * to set the demodulator parameters. All
25 * firmwares are using the 2-parameter commmand.
26 * An exception is the "drxk_a3.mc" firmware,
27 * which uses the 4-parameter command.
28 * A value of 0 (default) or lower indicates that
29 * the correct number of parameters will be
30 * automatically detected.
31 * @load_firmware_sync: Force the firmware load to be synchronous.
33 * On the *_gpio vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is
34 * UIO-3.
36 struct drxk_config {
37 u8 adr;
38 bool single_master;
39 bool no_i2c_bridge;
40 bool parallel_ts;
41 bool dynamic_clk;
42 bool enable_merr_cfg;
43 bool load_firmware_sync;
45 bool antenna_dvbt;
46 u16 antenna_gpio;
48 u8 mpeg_out_clk_strength;
49 int chunk_size;
51 const char *microcode_name;
52 int qam_demod_parameter_count;
55 #if defined(CONFIG_DVB_DRXK) || (defined(CONFIG_DVB_DRXK_MODULE) \
56 && defined(MODULE))
57 extern struct dvb_frontend *drxk_attach(const struct drxk_config *config,
58 struct i2c_adapter *i2c);
59 #else
60 static inline struct dvb_frontend *drxk_attach(const struct drxk_config *config,
61 struct i2c_adapter *i2c)
63 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
64 return NULL;
66 #endif
68 #endif