diff options
Diffstat (limited to 'drivers/media/dvb/frontends/stb0899_drv.h')
-rw-r--r-- | drivers/media/dvb/frontends/stb0899_drv.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/stb0899_drv.h b/drivers/media/dvb/frontends/stb0899_drv.h new file mode 100644 index 000000000000..52c2ce17f856 --- /dev/null +++ b/drivers/media/dvb/frontends/stb0899_drv.h | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | STB0899 Multistandard Frontend driver | ||
3 | Copyright (C) Manu Abraham (abraham.manu@gmail.com) | ||
4 | |||
5 | Copyright (C) ST Microelectronics | ||
6 | |||
7 | This program is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation; either version 2 of the License, or | ||
10 | (at your option) any later version. | ||
11 | |||
12 | This program is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program; if not, write to the Free Software | ||
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | */ | ||
21 | |||
22 | #ifndef __STB0899_DRV_H | ||
23 | #define __STB0899_DRV_H | ||
24 | |||
25 | #include <linux/kernel.h> | ||
26 | #include <linux/module.h> | ||
27 | |||
28 | #include "dvb_frontend.h" | ||
29 | |||
30 | #define STB0899_TSMODE_SERIAL 1 | ||
31 | #define STB0899_CLKPOL_FALLING 2 | ||
32 | #define STB0899_CLKNULL_PARITY 3 | ||
33 | #define STB0899_SYNC_FORCED 4 | ||
34 | #define STB0899_FECMODE_DSS 5 | ||
35 | |||
36 | struct stb0899_s1_reg { | ||
37 | u16 address; | ||
38 | u8 data; | ||
39 | }; | ||
40 | |||
41 | struct stb0899_s2_reg { | ||
42 | u16 offset; | ||
43 | u32 base_address; | ||
44 | u32 data; | ||
45 | }; | ||
46 | |||
47 | struct stb0899_config { | ||
48 | const struct stb0899_s1_reg *init_dev; | ||
49 | const struct stb0899_s2_reg *init_s2_demod; | ||
50 | const struct stb0899_s1_reg *init_s1_demod; | ||
51 | const struct stb0899_s2_reg *init_s2_fec; | ||
52 | const struct stb0899_s1_reg *init_tst; | ||
53 | |||
54 | u32 xtal_freq; | ||
55 | |||
56 | u8 demod_address; | ||
57 | u8 ts_output_mode; | ||
58 | u8 block_sync_mode; | ||
59 | u8 ts_pfbit_toggle; | ||
60 | |||
61 | u8 clock_polarity; | ||
62 | u8 data_clk_parity; | ||
63 | u8 fec_mode; | ||
64 | u8 data_output_ctl; | ||
65 | u8 data_fifo_mode; | ||
66 | u8 out_rate_comp; | ||
67 | u8 i2c_repeater; | ||
68 | int inversion; | ||
69 | |||
70 | u32 esno_ave; | ||
71 | u32 esno_quant; | ||
72 | u32 avframes_coarse; | ||
73 | u32 avframes_fine; | ||
74 | u32 miss_threshold; | ||
75 | u32 uwp_threshold_acq; | ||
76 | u32 uwp_threshold_track; | ||
77 | u32 uwp_threshold_sof; | ||
78 | u32 sof_search_timeout; | ||
79 | |||
80 | u32 btr_nco_bits; | ||
81 | u32 btr_gain_shift_offset; | ||
82 | u32 crl_nco_bits; | ||
83 | u32 ldpc_max_iter; | ||
84 | |||
85 | int (*tuner_set_frequency)(struct dvb_frontend *fe, u32 frequency); | ||
86 | int (*tuner_get_frequency)(struct dvb_frontend *fe, u32 *frequency); | ||
87 | int (*tuner_set_bandwidth)(struct dvb_frontend *fe, u32 bandwidth); | ||
88 | int (*tuner_get_bandwidth)(struct dvb_frontend *fe, u32 *bandwidth); | ||
89 | int (*tuner_set_rfsiggain)(struct dvb_frontend *fe, u32 rf_gain); | ||
90 | }; | ||
91 | |||
92 | extern struct dvb_frontend *stb0899_attach(struct stb0899_config *config, struct i2c_adapter *i2c); | ||
93 | |||
94 | #endif | ||