sfc: Don't use enums as a bitmask.
[zen-stable.git] / drivers / media / common / tuners / tuner-xc2028.h
blob9778c96a5006b03f88b5659c2b043c3024f9698f
1 /* tuner-xc2028
3 * Copyright (c) 2007-2008 Mauro Carvalho Chehab (mchehab@infradead.org)
4 * This code is placed under the terms of the GNU General Public License v2
5 */
7 #ifndef __TUNER_XC2028_H__
8 #define __TUNER_XC2028_H__
10 #include "dvb_frontend.h"
12 #define XC2028_DEFAULT_FIRMWARE "xc3028-v27.fw"
13 #define XC3028L_DEFAULT_FIRMWARE "xc3028L-v36.fw"
15 /* Dmoduler IF (kHz) */
16 #define XC3028_FE_DEFAULT 0 /* Don't load SCODE */
17 #define XC3028_FE_LG60 6000
18 #define XC3028_FE_ATI638 6380
19 #define XC3028_FE_OREN538 5380
20 #define XC3028_FE_OREN36 3600
21 #define XC3028_FE_TOYOTA388 3880
22 #define XC3028_FE_TOYOTA794 7940
23 #define XC3028_FE_DIBCOM52 5200
24 #define XC3028_FE_ZARLINK456 4560
25 #define XC3028_FE_CHINA 5200
27 enum firmware_type {
28 XC2028_AUTO = 0, /* By default, auto-detects */
29 XC2028_D2633,
30 XC2028_D2620,
33 struct xc2028_ctrl {
34 char *fname;
35 int max_len;
36 int msleep;
37 unsigned int scode_table;
38 unsigned int mts :1;
39 unsigned int input1:1;
40 unsigned int vhfbw7:1;
41 unsigned int uhfbw8:1;
42 unsigned int disable_power_mgmt:1;
43 unsigned int read_not_reliable:1;
44 unsigned int demod;
45 enum firmware_type type:2;
48 struct xc2028_config {
49 struct i2c_adapter *i2c_adap;
50 u8 i2c_addr;
51 struct xc2028_ctrl *ctrl;
54 /* xc2028 commands for callback */
55 #define XC2028_TUNER_RESET 0
56 #define XC2028_RESET_CLK 1
58 #if defined(CONFIG_MEDIA_TUNER_XC2028) || (defined(CONFIG_MEDIA_TUNER_XC2028_MODULE) && defined(MODULE))
59 extern struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
60 struct xc2028_config *cfg);
61 #else
62 static inline struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
63 struct xc2028_config *cfg)
65 printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
66 __func__);
67 return NULL;
69 #endif
71 #endif /* __TUNER_XC2028_H__ */