xref: /OK3568_Linux_fs/kernel/drivers/media/dvb-frontends/mt312.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun     Driver for Zarlink MT312 Satellite Channel Decoder
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun     Copyright (C) 2003 Andreas Oberritter <obi@linuxtv.org>
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun     References:
9*4882a593Smuzhiyun     http://products.zarlink.com/product_profiles/MT312.htm
10*4882a593Smuzhiyun     http://products.zarlink.com/product_profiles/SL1935.htm
11*4882a593Smuzhiyun */
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun #ifndef MT312_H
14*4882a593Smuzhiyun #define MT312_H
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun #include <linux/dvb/frontend.h>
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun struct mt312_config {
19*4882a593Smuzhiyun 	/* the demodulator's i2c address */
20*4882a593Smuzhiyun 	u8 demod_address;
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun 	/* inverted voltage setting */
23*4882a593Smuzhiyun 	unsigned int voltage_inverted:1;
24*4882a593Smuzhiyun };
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun #if IS_REACHABLE(CONFIG_DVB_MT312)
27*4882a593Smuzhiyun struct dvb_frontend *mt312_attach(const struct mt312_config *config,
28*4882a593Smuzhiyun 					struct i2c_adapter *i2c);
29*4882a593Smuzhiyun #else
mt312_attach(const struct mt312_config * config,struct i2c_adapter * i2c)30*4882a593Smuzhiyun static inline struct dvb_frontend *mt312_attach(
31*4882a593Smuzhiyun 	const struct mt312_config *config, struct i2c_adapter *i2c)
32*4882a593Smuzhiyun {
33*4882a593Smuzhiyun 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
34*4882a593Smuzhiyun 	return NULL;
35*4882a593Smuzhiyun }
36*4882a593Smuzhiyun #endif /* CONFIG_DVB_MT312 */
37*4882a593Smuzhiyun 
38*4882a593Smuzhiyun #endif /* MT312_H */
39