2 STB0899 Multistandard Frontend driver
3 Copyright (C) Manu Abraham (abraham.manu@gmail.com)
5 Copyright (C) ST Microelectronics
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.
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.
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.
22 #ifndef __STB0899_DRV_H
23 #define __STB0899_DRV_H
25 #include <linux/kernel.h>
26 #include <linux/module.h>
28 #include "dvb_frontend.h"
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
36 struct stb0899_s1_reg {
41 struct stb0899_s2_reg {
47 enum stb0899_inversion {
53 struct stb0899_config {
54 const struct stb0899_s1_reg *init_dev;
55 const struct stb0899_s2_reg *init_s2_demod;
56 const struct stb0899_s1_reg *init_s1_demod;
57 const struct stb0899_s2_reg *init_s2_fec;
58 const struct stb0899_s1_reg *init_tst;
60 enum stb0899_inversion inversion;
83 u32 uwp_threshold_acq;
84 u32 uwp_threshold_track;
85 u32 uwp_threshold_sof;
86 u32 sof_search_timeout;
89 u32 btr_gain_shift_offset;
93 int (*tuner_set_frequency)(struct dvb_frontend *fe, u32 frequency);
94 int (*tuner_get_frequency)(struct dvb_frontend *fe, u32 *frequency);
95 int (*tuner_set_bandwidth)(struct dvb_frontend *fe, u32 bandwidth);
96 int (*tuner_get_bandwidth)(struct dvb_frontend *fe, u32 *bandwidth);
97 int (*tuner_set_rfsiggain)(struct dvb_frontend *fe, u32 rf_gain);
100 #if defined(CONFIG_DVB_STB0899) || (defined(CONFIG_DVB_STB0899_MODULE) && defined(MODULE))
102 extern struct dvb_frontend *stb0899_attach(struct stb0899_config *config,
103 struct i2c_adapter *i2c);
107 static inline struct dvb_frontend *stb0899_attach(struct stb0899_config *config,
108 struct i2c_adapter *i2c)
110 printk(KERN_WARNING "%s: Driver disabled by Kconfig\n", __func__);
114 #endif //CONFIG_DVB_STB0899