aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/tda827x.h
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-04-27 11:31:14 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:43:35 -0400
commit8ce47dad8e2b9fcb899a67e6537337fa9c18c1f5 (patch)
tree8482515d25ebc98bf7ac74e47b78f576f23b753f /drivers/media/dvb/frontends/tda827x.h
parent7c7fea669d77048b3013567dfb4c9171d536da05 (diff)
V4L/DVB (5317): Create tda827x dvb tuner module
The patch moves the tda827x dvb tuning code to a separate module Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/tda827x.h')
-rw-r--r--drivers/media/dvb/frontends/tda827x.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/tda827x.h b/drivers/media/dvb/frontends/tda827x.h
new file mode 100644
index 000000000000..69e8263d6d59
--- /dev/null
+++ b/drivers/media/dvb/frontends/tda827x.h
@@ -0,0 +1,62 @@
1 /*
2 DVB Driver for Philips tda827x / tda827xa Silicon tuners
3
4 (c) 2005 Hartmut Hackmann
5 (c) 2007 Michael Krufky
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
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
22 */
23
24#ifndef __DVB_TDA827X_H__
25#define __DVB_TDA827X_H__
26
27#include <linux/i2c.h>
28#include "dvb_frontend.h"
29
30struct tda827x_config
31{
32 void (*lna_gain) (struct dvb_frontend *fe, int high);
33 int (*init) (struct dvb_frontend *fe);
34 int (*sleep) (struct dvb_frontend *fe);
35};
36
37
38/**
39 * Attach a tda827x tuner to the supplied frontend structure.
40 *
41 * @param fe Frontend to attach to.
42 * @param addr i2c address of the tuner.
43 * @param i2c i2c adapter to use.
44 * @param cfg optional callback function pointers.
45 * @return FE pointer on success, NULL on failure.
46 */
47#if defined(CONFIG_DVB_TDA827X) || (defined(CONFIG_DVB_TDA827X_MODULE) && defined(MODULE))
48extern struct dvb_frontend* tda827x_attach(struct dvb_frontend *fe, int addr,
49 struct i2c_adapter *i2c,
50 struct tda827x_config *cfg);
51#else
52static inline struct dvb_frontend* tda827x_attach(struct dvb_frontend *fe,
53 int addr,
54 struct i2c_adapter *i2c,
55 struct tda827x_config *cfg)
56{
57 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
58 return NULL;
59}
60#endif // CONFIG_DVB_TDA827X
61
62#endif // __DVB_TDA827X_H__