xref: /OK3568_Linux_fs/kernel/drivers/media/dvb-frontends/tda10086.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */
2*4882a593Smuzhiyun   /*
3*4882a593Smuzhiyun      Driver for Philips tda10086 DVBS Frontend
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun      (c) 2006 Andrew de Quincey
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun    */
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun #ifndef TDA10086_H
11*4882a593Smuzhiyun #define TDA10086_H
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun #include <linux/dvb/frontend.h>
14*4882a593Smuzhiyun #include <linux/firmware.h>
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun enum tda10086_xtal {
17*4882a593Smuzhiyun 	TDA10086_XTAL_16M,
18*4882a593Smuzhiyun 	TDA10086_XTAL_4M
19*4882a593Smuzhiyun };
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun struct tda10086_config
22*4882a593Smuzhiyun {
23*4882a593Smuzhiyun 	/* the demodulator's i2c address */
24*4882a593Smuzhiyun 	u8 demod_address;
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun 	/* does the "inversion" need inverted? */
27*4882a593Smuzhiyun 	u8 invert;
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun 	/* do we need the diseqc signal with carrier? */
30*4882a593Smuzhiyun 	u8 diseqc_tone;
31*4882a593Smuzhiyun 
32*4882a593Smuzhiyun 	/* frequency of the reference xtal */
33*4882a593Smuzhiyun 	enum tda10086_xtal xtal_freq;
34*4882a593Smuzhiyun };
35*4882a593Smuzhiyun 
36*4882a593Smuzhiyun #if IS_REACHABLE(CONFIG_DVB_TDA10086)
37*4882a593Smuzhiyun extern struct dvb_frontend* tda10086_attach(const struct tda10086_config* config,
38*4882a593Smuzhiyun 					    struct i2c_adapter* i2c);
39*4882a593Smuzhiyun #else
tda10086_attach(const struct tda10086_config * config,struct i2c_adapter * i2c)40*4882a593Smuzhiyun static inline struct dvb_frontend* tda10086_attach(const struct tda10086_config* config,
41*4882a593Smuzhiyun 						   struct i2c_adapter* i2c)
42*4882a593Smuzhiyun {
43*4882a593Smuzhiyun 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
44*4882a593Smuzhiyun 	return NULL;
45*4882a593Smuzhiyun }
46*4882a593Smuzhiyun #endif /* CONFIG_DVB_TDA10086 */
47*4882a593Smuzhiyun 
48*4882a593Smuzhiyun #endif /* TDA10086_H */
49