diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-06-26 12:12:08 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:24:23 -0400 |
commit | 8218b0b2caecf4af55742e12e9986c15605bb197 (patch) | |
tree | 99285845e50f4b0f0a05466743a721955e26fc74 /drivers | |
parent | bebeaea0a54869b59b45ea22a93f325ce0369d61 (diff) |
V4L/DVB (5793): Tuner: remove hardware-specific info from public header
Move internal structures and debug macros to drivers/media/video/tuner-driver.h
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/mt20xx.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tda8290.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tda9887.c | 1 | ||||
-rw-r--r-- | drivers/media/video/tea5761.c | 1 | ||||
-rw-r--r-- | drivers/media/video/tea5767.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tuner-core.c | 1 | ||||
-rw-r--r-- | drivers/media/video/tuner-driver.h | 107 | ||||
-rw-r--r-- | drivers/media/video/tuner-simple.c | 2 |
8 files changed, 115 insertions, 3 deletions
diff --git a/drivers/media/video/mt20xx.c b/drivers/media/video/mt20xx.c index 8a838bdb01b6..7549114aaaca 100644 --- a/drivers/media/video/mt20xx.c +++ b/drivers/media/video/mt20xx.c | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <linux/i2c.h> | 7 | #include <linux/i2c.h> |
8 | #include <linux/videodev.h> | 8 | #include <linux/videodev.h> |
9 | #include <linux/moduleparam.h> | 9 | #include <linux/moduleparam.h> |
10 | #include <media/tuner.h> | 10 | #include "tuner-driver.h" |
11 | 11 | ||
12 | /* ---------------------------------------------------------------------- */ | 12 | /* ---------------------------------------------------------------------- */ |
13 | 13 | ||
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c index 9c1b64c51c02..59cff5a3c59e 100644 --- a/drivers/media/video/tda8290.c +++ b/drivers/media/video/tda8290.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
22 | #include <linux/videodev.h> | 22 | #include <linux/videodev.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <media/tuner.h> | 24 | #include "tuner-driver.h" |
25 | 25 | ||
26 | /* ---------------------------------------------------------------------- */ | 26 | /* ---------------------------------------------------------------------- */ |
27 | 27 | ||
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c index caca1092790e..a8f773274fe3 100644 --- a/drivers/media/video/tda9887.c +++ b/drivers/media/video/tda9887.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <media/v4l2-common.h> | 12 | #include <media/v4l2-common.h> |
13 | #include <media/tuner.h> | 13 | #include <media/tuner.h> |
14 | #include "tuner-driver.h" | ||
14 | 15 | ||
15 | 16 | ||
16 | /* Chips: | 17 | /* Chips: |
diff --git a/drivers/media/video/tea5761.c b/drivers/media/video/tea5761.c index 2fcb81d4d0dd..ae105c2cd0ac 100644 --- a/drivers/media/video/tea5761.c +++ b/drivers/media/video/tea5761.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/videodev.h> | 11 | #include <linux/videodev.h> |
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <media/tuner.h> | 13 | #include <media/tuner.h> |
14 | #include "tuner-driver.h" | ||
14 | 15 | ||
15 | #define PREFIX "TEA5761 " | 16 | #define PREFIX "TEA5761 " |
16 | 17 | ||
diff --git a/drivers/media/video/tea5767.c b/drivers/media/video/tea5767.c index 9cce9be718c5..4985d47a508f 100644 --- a/drivers/media/video/tea5767.c +++ b/drivers/media/video/tea5767.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/videodev.h> | 14 | #include <linux/videodev.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <media/tuner.h> | 16 | #include "tuner-driver.h" |
17 | 17 | ||
18 | #define PREFIX "TEA5767 " | 18 | #define PREFIX "TEA5767 " |
19 | 19 | ||
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 603476532f5c..e646465464a1 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <media/tuner.h> | 21 | #include <media/tuner.h> |
22 | #include <media/v4l2-common.h> | 22 | #include <media/v4l2-common.h> |
23 | #include "tuner-driver.h" | ||
23 | 24 | ||
24 | #define UNSET (-1U) | 25 | #define UNSET (-1U) |
25 | 26 | ||
diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h new file mode 100644 index 000000000000..0334a9125077 --- /dev/null +++ b/drivers/media/video/tuner-driver.h | |||
@@ -0,0 +1,107 @@ | |||
1 | /* | ||
2 | tuner-driver.h - interface for different tuners | ||
3 | |||
4 | Copyright (C) 1997 Markus Schroeder (schroedm@uni-duesseldorf.de) | ||
5 | minor modifications by Ralph Metzler (rjkm@thp.uni-koeln.de) | ||
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 __TUNER_HW_H__ | ||
23 | #define __TUNER_HW_H__ | ||
24 | |||
25 | #include <linux/videodev2.h> | ||
26 | #include <linux/i2c.h> | ||
27 | |||
28 | extern unsigned const int tuner_count; | ||
29 | |||
30 | struct tuner_operations { | ||
31 | void (*set_tv_freq)(struct i2c_client *c, unsigned int freq); | ||
32 | void (*set_radio_freq)(struct i2c_client *c, unsigned int freq); | ||
33 | int (*has_signal)(struct i2c_client *c); | ||
34 | int (*is_stereo)(struct i2c_client *c); | ||
35 | int (*get_afc)(struct i2c_client *c); | ||
36 | void (*tuner_status)(struct i2c_client *c); | ||
37 | void (*standby)(struct i2c_client *c); | ||
38 | void (*release)(struct i2c_client *c); | ||
39 | }; | ||
40 | |||
41 | struct tuner { | ||
42 | /* device */ | ||
43 | struct i2c_client i2c; | ||
44 | |||
45 | unsigned int type; /* chip type */ | ||
46 | |||
47 | unsigned int mode; | ||
48 | unsigned int mode_mask; /* Combination of allowable modes */ | ||
49 | |||
50 | unsigned int tv_freq; /* keep track of the current settings */ | ||
51 | unsigned int radio_freq; | ||
52 | u16 last_div; | ||
53 | unsigned int audmode; | ||
54 | v4l2_std_id std; | ||
55 | |||
56 | int using_v4l2; | ||
57 | void *priv; | ||
58 | |||
59 | /* used by tda9887 */ | ||
60 | unsigned int tda9887_config; | ||
61 | |||
62 | unsigned int config; | ||
63 | int (*tuner_callback) (void *dev, int command,int arg); | ||
64 | |||
65 | struct tuner_operations ops; | ||
66 | }; | ||
67 | |||
68 | /* ------------------------------------------------------------------------ */ | ||
69 | |||
70 | extern int default_tuner_init(struct i2c_client *c); | ||
71 | |||
72 | extern int tda9887_tuner_init(struct i2c_client *c); | ||
73 | |||
74 | extern int microtune_init(struct i2c_client *c); | ||
75 | |||
76 | extern int tda8290_init(struct i2c_client *c); | ||
77 | extern int tda8290_probe(struct i2c_client *c); | ||
78 | |||
79 | extern int tea5761_tuner_init(struct i2c_client *c); | ||
80 | extern int tea5761_autodetection(struct i2c_client *c); | ||
81 | |||
82 | extern int tea5767_autodetection(struct i2c_client *c); | ||
83 | extern int tea5767_tuner_init(struct i2c_client *c); | ||
84 | |||
85 | /* ------------------------------------------------------------------------ */ | ||
86 | |||
87 | #define tuner_warn(fmt, arg...) do {\ | ||
88 | printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ | ||
89 | i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) | ||
90 | #define tuner_info(fmt, arg...) do {\ | ||
91 | printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ | ||
92 | i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) | ||
93 | #define tuner_dbg(fmt, arg...) do {\ | ||
94 | extern int tuner_debug; \ | ||
95 | if (tuner_debug) \ | ||
96 | printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ | ||
97 | i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) | ||
98 | |||
99 | #endif /* __TUNER_HW_H__ */ | ||
100 | |||
101 | /* | ||
102 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
103 | * --------------------------------------------------------------------------- | ||
104 | * Local variables: | ||
105 | * c-basic-offset: 8 | ||
106 | * End: | ||
107 | */ | ||
diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c index fd23c1d8aa26..2d57e8bc0db3 100644 --- a/drivers/media/video/tuner-simple.c +++ b/drivers/media/video/tuner-simple.c | |||
@@ -8,6 +8,8 @@ | |||
8 | #include <linux/videodev.h> | 8 | #include <linux/videodev.h> |
9 | #include <media/tuner.h> | 9 | #include <media/tuner.h> |
10 | #include <media/v4l2-common.h> | 10 | #include <media/v4l2-common.h> |
11 | #include <media/tuner-types.h> | ||
12 | #include "tuner-driver.h" | ||
11 | 13 | ||
12 | static int offset = 0; | 14 | static int offset = 0; |
13 | module_param(offset, int, 0664); | 15 | module_param(offset, int, 0664); |