diff options
author | Antti Palosaari <crope@iki.fi> | 2009-03-25 15:59:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:40 -0400 |
commit | eebb876b0b8f7ee5e6c01a85433a754c9be88369 (patch) | |
tree | 5b16d997054b31c8b32cc4e8add7ff05db1bc62e /drivers/media/dvb/dvb-usb/ce6230.h | |
parent | 378a2793eb5e1e6bcd44f85d368ad6962c8ce1ee (diff) |
V4L/DVB (11216): Add driver for Intel CE6230 DVB-T USB2.0
Add driver for Intel CE6230 DVB-T USB 2.0 COFDM demodulator
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/ce6230.h')
-rw-r--r-- | drivers/media/dvb/dvb-usb/ce6230.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/ce6230.h b/drivers/media/dvb/dvb-usb/ce6230.h new file mode 100644 index 000000000000..97c42482ccb3 --- /dev/null +++ b/drivers/media/dvb/dvb-usb/ce6230.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * DVB USB Linux driver for Intel CE6230 DVB-T USB2.0 receiver | ||
3 | * | ||
4 | * Copyright (C) 2009 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 | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | #ifndef _DVB_USB_CE6230_H_ | ||
23 | #define _DVB_USB_CE6230_H_ | ||
24 | |||
25 | #define DVB_USB_LOG_PREFIX "ce6230" | ||
26 | #include "dvb-usb.h" | ||
27 | |||
28 | #define deb_info(args...) dprintk(dvb_usb_ce6230_debug, 0x01, args) | ||
29 | #define deb_rc(args...) dprintk(dvb_usb_ce6230_debug, 0x02, args) | ||
30 | #define deb_xfer(args...) dprintk(dvb_usb_ce6230_debug, 0x04, args) | ||
31 | #define deb_reg(args...) dprintk(dvb_usb_ce6230_debug, 0x08, args) | ||
32 | #define deb_i2c(args...) dprintk(dvb_usb_ce6230_debug, 0x10, args) | ||
33 | #define deb_fw(args...) dprintk(dvb_usb_ce6230_debug, 0x20, args) | ||
34 | |||
35 | #define ce6230_debug_dump(r, t, v, i, b, l, func) { \ | ||
36 | int loop_; \ | ||
37 | func("%02x %02x %02x %02x %02x %02x %02x %02x", \ | ||
38 | t, r, v & 0xff, v >> 8, i & 0xff, i >> 8, l & 0xff, l >> 8); \ | ||
39 | if (t == (USB_TYPE_VENDOR | USB_DIR_OUT)) \ | ||
40 | func(" >>> "); \ | ||
41 | else \ | ||
42 | func(" <<< "); \ | ||
43 | for (loop_ = 0; loop_ < l; loop_++) \ | ||
44 | func("%02x ", b[loop_]); \ | ||
45 | func("\n");\ | ||
46 | } | ||
47 | |||
48 | #define CE6230_USB_TIMEOUT 1000 | ||
49 | |||
50 | struct req_t { | ||
51 | u8 cmd; /* [1] */ | ||
52 | u16 value; /* [2|3] */ | ||
53 | u16 index; /* [4|5] */ | ||
54 | u16 data_len; /* [6|7] */ | ||
55 | u8 *data; | ||
56 | }; | ||
57 | |||
58 | enum ce6230_cmd { | ||
59 | CONFIG_READ = 0xd0, /* rd 0 (unclear) */ | ||
60 | UNKNOWN_WRITE = 0xc7, /* wr 7 (unclear) */ | ||
61 | I2C_READ = 0xd9, /* rd 9 (unclear) */ | ||
62 | I2C_WRITE = 0xca, /* wr a */ | ||
63 | DEMOD_READ = 0xdb, /* rd b */ | ||
64 | DEMOD_WRITE = 0xcc, /* wr c */ | ||
65 | REG_READ = 0xde, /* rd e */ | ||
66 | REG_WRITE = 0xcf, /* wr f */ | ||
67 | }; | ||
68 | |||
69 | #endif | ||