2 * SPDX-License-Identifier: GPL-2.0
5 * Copyright (c) 2007-2008 Mauro Carvalho Chehab (mchehab@infradead.org)
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
29 XC2028_AUTO
= 0, /* By default, auto-detects */
38 unsigned int scode_table
;
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;
46 enum firmware_type type
:2;
49 struct xc2028_config
{
50 struct i2c_adapter
*i2c_adap
;
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
);
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",
73 #endif /* __TUNER_XC2028_H__ */