Linux 4.19.133
[linux/fpc-iii.git] / drivers / media / tuners / tuner-xc2028.h
blob7b58bc06e35caba4a9bd392aca7337affcd9ae1b
1 /*
2 * SPDX-License-Identifier: GPL-2.0
3 * tuner-xc2028
5 * Copyright (c) 2007-2008 Mauro Carvalho Chehab <mchehab@kernel.org>
6 */
8 #ifndef __TUNER_XC2028_H__
9 #define __TUNER_XC2028_H__
11 #include <media/dvb_frontend.h>
13 #define XC2028_DEFAULT_FIRMWARE "xc3028-v27.fw"
14 #define XC3028L_DEFAULT_FIRMWARE "xc3028L-v36.fw"
16 /* Dmoduler IF (kHz) */
17 #define XC3028_FE_DEFAULT 0 /* Don't load SCODE */
18 #define XC3028_FE_LG60 6000
19 #define XC3028_FE_ATI638 6380
20 #define XC3028_FE_OREN538 5380
21 #define XC3028_FE_OREN36 3600
22 #define XC3028_FE_TOYOTA388 3880
23 #define XC3028_FE_TOYOTA794 7940
24 #define XC3028_FE_DIBCOM52 5200
25 #define XC3028_FE_ZARLINK456 4560
26 #define XC3028_FE_CHINA 5200
28 enum firmware_type {
29 XC2028_AUTO = 0, /* By default, auto-detects */
30 XC2028_D2633,
31 XC2028_D2620,
34 struct xc2028_ctrl {
35 char *fname;
36 int max_len;
37 int msleep;
38 unsigned int scode_table;
39 unsigned int mts :1;
40 unsigned int input1:1;
41 unsigned int vhfbw7:1;
42 unsigned int uhfbw8:1;
43 unsigned int disable_power_mgmt:1;
44 unsigned int read_not_reliable:1;
45 unsigned int demod;
46 enum firmware_type type:2;
49 struct xc2028_config {
50 struct i2c_adapter *i2c_adap;
51 u8 i2c_addr;
52 struct xc2028_ctrl *ctrl;
55 /* xc2028 commands for callback */
56 #define XC2028_TUNER_RESET 0
57 #define XC2028_RESET_CLK 1
58 #define XC2028_I2C_FLUSH 2
60 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_XC2028)
61 extern struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
62 struct xc2028_config *cfg);
63 #else
64 static inline struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
65 struct xc2028_config *cfg)
67 printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
68 __func__);
69 return NULL;
71 #endif
73 #endif /* __TUNER_XC2028_H__ */