diff options
author | Antti Palosaari <crope@iki.fi> | 2011-04-07 15:27:43 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 08:30:10 -0400 |
commit | 27cfc85e3dae187a470f7aa54123689a487970f2 (patch) | |
tree | c49b86487a1e507eec82a5babd7cd05af081e814 /drivers/media/dvb/frontends/cxd2820r_priv.h | |
parent | bc022694d7da1c848e395f18eaf856abc9dd0b09 (diff) |
[media] Sony CXD2820R DVB-T/T2/C demodulator driver
It is very first DVB-T2 Linux driver!
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/cxd2820r_priv.h')
-rw-r--r-- | drivers/media/dvb/frontends/cxd2820r_priv.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/cxd2820r_priv.h b/drivers/media/dvb/frontends/cxd2820r_priv.h new file mode 100644 index 000000000000..4d2d79969d91 --- /dev/null +++ b/drivers/media/dvb/frontends/cxd2820r_priv.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * Sony CXD2820R demodulator driver | ||
3 | * | ||
4 | * Copyright (C) 2010 Antti Palosaari <crope@iki.fi> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | |||
22 | #ifndef CXD2820R_PRIV_H | ||
23 | #define CXD2820R_PRIV_H | ||
24 | |||
25 | #include "dvb_frontend.h" | ||
26 | #include "dvb_math.h" | ||
27 | #include "cxd2820r.h" | ||
28 | |||
29 | #define LOG_PREFIX "cxd2820r" | ||
30 | |||
31 | #undef dbg | ||
32 | #define dbg(f, arg...) \ | ||
33 | if (cxd2820r_debug) \ | ||
34 | printk(KERN_INFO LOG_PREFIX": " f "\n" , ## arg) | ||
35 | #undef err | ||
36 | #define err(f, arg...) printk(KERN_ERR LOG_PREFIX": " f "\n" , ## arg) | ||
37 | #undef info | ||
38 | #define info(f, arg...) printk(KERN_INFO LOG_PREFIX": " f "\n" , ## arg) | ||
39 | #undef warn | ||
40 | #define warn(f, arg...) printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg) | ||
41 | |||
42 | /* | ||
43 | * FIXME: These are totally wrong and must be added properly to the API. | ||
44 | * Only temporary solution in order to get driver compile. | ||
45 | */ | ||
46 | #define SYS_DVBT2 SYS_DAB | ||
47 | #define TRANSMISSION_MODE_1K 0 | ||
48 | #define TRANSMISSION_MODE_16K 0 | ||
49 | #define TRANSMISSION_MODE_32K 0 | ||
50 | #define GUARD_INTERVAL_1_128 0 | ||
51 | #define GUARD_INTERVAL_19_128 0 | ||
52 | #define GUARD_INTERVAL_19_256 0 | ||
53 | |||
54 | struct reg_val_mask { | ||
55 | u32 reg; | ||
56 | u8 val; | ||
57 | u8 mask; | ||
58 | }; | ||
59 | |||
60 | struct cxd2820r_priv { | ||
61 | struct i2c_adapter *i2c; | ||
62 | struct dvb_frontend fe[2]; | ||
63 | struct cxd2820r_config cfg; | ||
64 | struct i2c_adapter tuner_i2c_adapter; | ||
65 | |||
66 | struct mutex fe_lock; /* FE lock */ | ||
67 | int active_fe:2; /* FE lock, -1=NONE, 0=DVB-T/T2, 1=DVB-C */ | ||
68 | |||
69 | int ber_running:1; | ||
70 | |||
71 | u8 bank[2]; | ||
72 | u8 gpio[3]; | ||
73 | |||
74 | fe_delivery_system_t delivery_system; | ||
75 | }; | ||
76 | |||
77 | #endif /* CXD2820R_PRIV_H */ | ||