1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
50struct req_t {
51 u8 cmd;
52 u16 value;
53 u16 index;
54 u16 data_len;
55 u8 *data;
56};
57
58enum ce6230_cmd {
59 CONFIG_READ = 0xd0,
60 UNKNOWN_WRITE = 0xc7,
61 I2C_READ = 0xd9,
62 I2C_WRITE = 0xca,
63 DEMOD_READ = 0xdb,
64 DEMOD_WRITE = 0xcc,
65 REG_READ = 0xde,
66 REG_WRITE = 0xcf,
67};
68
69#endif
70