diff options
author | Igor M. Liplianin <liplianin@me.by> | 2008-09-23 14:43:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:37:07 -0400 |
commit | e4aab64cb78a42e45e1d387f272712e06cf89a66 (patch) | |
tree | 71085956cf8364b5a49723c9812cd18a54bbb792 /drivers/media/dvb/frontends/stv0288.h | |
parent | 8316568930074723bdc47d6777f822be0422a5b7 (diff) |
V4L/DVB (9026): Add support for ST STV0288 demodulator and cards with it.
Add support for ST STV0288 demodulator and cards with it,
such as TeVii S420.
Patch is co-authored with Georg Acher <acher@baycom.de>
Signed-off-by: Georg Acher <acher@baycom.de>
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/stv0288.h')
-rw-r--r-- | drivers/media/dvb/frontends/stv0288.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/stv0288.h b/drivers/media/dvb/frontends/stv0288.h new file mode 100644 index 000000000000..aa0cdd273040 --- /dev/null +++ b/drivers/media/dvb/frontends/stv0288.h | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | Driver for ST STV0288 demodulator | ||
3 | |||
4 | Copyright (C) 2006 Georg Acher, BayCom GmbH, acher (at) baycom (dot) de | ||
5 | for Reel Multimedia | ||
6 | Copyright (C) 2008 TurboSight.com, <bob@turbosight.com> | ||
7 | Copyright (C) 2008 Igor M. Liplianin <liplianin@me.by> | ||
8 | Removed stb6000 specific tuner code and revised some | ||
9 | procedures. | ||
10 | |||
11 | This program is free software; you can redistribute it and/or modify | ||
12 | it under the terms of the GNU General Public License as published by | ||
13 | the Free Software Foundation; either version 2 of the License, or | ||
14 | (at your option) any later version. | ||
15 | |||
16 | This program is distributed in the hope that it will be useful, | ||
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | GNU General Public License for more details. | ||
20 | |||
21 | You should have received a copy of the GNU General Public License | ||
22 | along with this program; if not, write to the Free Software | ||
23 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
24 | |||
25 | */ | ||
26 | |||
27 | #ifndef STV0288_H | ||
28 | #define STV0288_H | ||
29 | |||
30 | #include <linux/dvb/frontend.h> | ||
31 | #include "dvb_frontend.h" | ||
32 | |||
33 | struct stv0288_config { | ||
34 | /* the demodulator's i2c address */ | ||
35 | u8 demod_address; | ||
36 | |||
37 | /* minimum delay before retuning */ | ||
38 | int min_delay_ms; | ||
39 | |||
40 | int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured); | ||
41 | }; | ||
42 | |||
43 | #if defined(CONFIG_DVB_STV0288) || (defined(CONFIG_DVB_STV0288_MODULE) && \ | ||
44 | defined(MODULE)) | ||
45 | extern struct dvb_frontend *stv0288_attach(const struct stv0288_config *config, | ||
46 | struct i2c_adapter *i2c); | ||
47 | #else | ||
48 | static inline struct dvb_frontend *stv0288_attach(const struct stv0288_config *config, | ||
49 | struct i2c_adapter *i2c) | ||
50 | { | ||
51 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); | ||
52 | return NULL; | ||
53 | } | ||
54 | #endif /* CONFIG_DVB_STV0288 */ | ||
55 | |||
56 | static inline int stv0288_writereg(struct dvb_frontend *fe, u8 reg, u8 val) | ||
57 | { | ||
58 | int r = 0; | ||
59 | u8 buf[] = { reg, val }; | ||
60 | if (fe->ops.write) | ||
61 | r = fe->ops.write(fe, buf, 2); | ||
62 | return r; | ||
63 | } | ||
64 | |||
65 | #endif /* STV0288_H */ | ||