1
2
3
4
5
6
7
8 #ifndef SI2168_PRIV_H
9 #define SI2168_PRIV_H
10
11 #include "si2168.h"
12 #include <media/dvb_frontend.h>
13 #include <linux/firmware.h>
14 #include <linux/i2c-mux.h>
15 #include <linux/kernel.h>
16
17 #define SI2168_A20_FIRMWARE "dvb-demod-si2168-a20-01.fw"
18 #define SI2168_A30_FIRMWARE "dvb-demod-si2168-a30-01.fw"
19 #define SI2168_B40_FIRMWARE "dvb-demod-si2168-b40-01.fw"
20 #define SI2168_D60_FIRMWARE "dvb-demod-si2168-d60-01.fw"
21 #define SI2168_B40_FIRMWARE_FALLBACK "dvb-demod-si2168-02.fw"
22
23
24 struct si2168_dev {
25 struct mutex i2c_mutex;
26 struct i2c_mux_core *muxc;
27 struct dvb_frontend fe;
28 enum fe_delivery_system delivery_system;
29 enum fe_status fe_status;
30 #define SI2168_CHIP_ID_A20 ('A' << 24 | 68 << 16 | '2' << 8 | '0' << 0)
31 #define SI2168_CHIP_ID_A30 ('A' << 24 | 68 << 16 | '3' << 8 | '0' << 0)
32 #define SI2168_CHIP_ID_B40 ('B' << 24 | 68 << 16 | '4' << 8 | '0' << 0)
33 #define SI2168_CHIP_ID_D60 ('D' << 24 | 68 << 16 | '6' << 8 | '0' << 0)
34 unsigned int chip_id;
35 unsigned int version;
36 const char *firmware_name;
37 bool active;
38 bool warm;
39 u8 ts_mode;
40 bool ts_clock_inv;
41 bool ts_clock_gapped;
42 bool spectral_inversion;
43 };
44
45
46 #define SI2168_ARGLEN 30
47 struct si2168_cmd {
48 u8 args[SI2168_ARGLEN];
49 unsigned wlen;
50 unsigned rlen;
51 };
52
53 #endif