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 / rtl2830.h
blob1c6ee91749c252403ea39bb8f2fe7b21a03a7f32
1 /*
2 * Realtek RTL2830 DVB-T demodulator driver
4 * Copyright (C) 2011 Antti Palosaari <crope@iki.fi>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef RTL2830_H
22 #define RTL2830_H
24 #include <linux/dvb/frontend.h>
26 struct rtl2830_config {
28 * Demodulator I2C address.
30 u8 i2c_addr;
33 * Xtal frequency.
34 * Hz
35 * 4000000, 16000000, 25000000, 28800000
37 u32 xtal;
40 * TS output mode.
42 u8 ts_mode;
45 * Spectrum inversion.
47 bool spec_inv;
50 * IFs for all used modes.
51 * Hz
52 * 4570000, 4571429, 36000000, 36125000, 36166667, 44000000
54 u32 if_dvbt;
58 u8 vtop;
62 u8 krf;
66 u8 agc_targ_val;
69 #if defined(CONFIG_DVB_RTL2830) || \
70 (defined(CONFIG_DVB_RTL2830_MODULE) && defined(MODULE))
71 extern struct dvb_frontend *rtl2830_attach(
72 const struct rtl2830_config *config,
73 struct i2c_adapter *i2c
76 extern struct i2c_adapter *rtl2830_get_tuner_i2c_adapter(
77 struct dvb_frontend *fe
79 #else
80 static inline struct dvb_frontend *rtl2830_attach(
81 const struct rtl2830_config *config,
82 struct i2c_adapter *i2c
85 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
86 return NULL;
89 static inline struct i2c_adapter *rtl2830_get_tuner_i2c_adapter(
90 struct dvb_frontend *fe
93 return NULL;
95 #endif
97 #endif /* RTL2830_H */