xref: /OK3568_Linux_fs/kernel/drivers/media/tuners/mt2063.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun #ifndef __MT2063_H__
3*4882a593Smuzhiyun #define __MT2063_H__
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun #include <media/dvb_frontend.h>
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun struct mt2063_config {
8*4882a593Smuzhiyun 	u8 tuner_address;
9*4882a593Smuzhiyun 	u32 refclock;
10*4882a593Smuzhiyun };
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun #if IS_REACHABLE(CONFIG_MEDIA_TUNER_MT2063)
13*4882a593Smuzhiyun struct dvb_frontend *mt2063_attach(struct dvb_frontend *fe,
14*4882a593Smuzhiyun 				   struct mt2063_config *config,
15*4882a593Smuzhiyun 				   struct i2c_adapter *i2c);
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun #else
18*4882a593Smuzhiyun 
mt2063_attach(struct dvb_frontend * fe,struct mt2063_config * config,struct i2c_adapter * i2c)19*4882a593Smuzhiyun static inline struct dvb_frontend *mt2063_attach(struct dvb_frontend *fe,
20*4882a593Smuzhiyun 				   struct mt2063_config *config,
21*4882a593Smuzhiyun 				   struct i2c_adapter *i2c)
22*4882a593Smuzhiyun {
23*4882a593Smuzhiyun 	printk(KERN_WARNING "%s: Driver disabled by Kconfig\n", __func__);
24*4882a593Smuzhiyun 	return NULL;
25*4882a593Smuzhiyun }
26*4882a593Smuzhiyun 
27*4882a593Smuzhiyun #endif /* CONFIG_DVB_MT2063 */
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun #endif /* __MT2063_H__ */
30