xref: /OK3568_Linux_fs/kernel/drivers/media/dvb-frontends/tda665x.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun 	TDA665x tuner driver
4*4882a593Smuzhiyun 	Copyright (C) Manu Abraham (abraham.manu@gmail.com)
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun */
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun #ifndef __TDA665x_H
9*4882a593Smuzhiyun #define __TDA665x_H
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun struct tda665x_config {
12*4882a593Smuzhiyun 	char name[128];
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun 	u8	addr;
15*4882a593Smuzhiyun 	u32	frequency_min;
16*4882a593Smuzhiyun 	u32	frequency_max;
17*4882a593Smuzhiyun 	u32	frequency_offst;
18*4882a593Smuzhiyun 	u32	ref_multiplier;
19*4882a593Smuzhiyun 	u32	ref_divider;
20*4882a593Smuzhiyun };
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun #if IS_REACHABLE(CONFIG_DVB_TDA665x)
23*4882a593Smuzhiyun 
24*4882a593Smuzhiyun extern struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe,
25*4882a593Smuzhiyun 					   const struct tda665x_config *config,
26*4882a593Smuzhiyun 					   struct i2c_adapter *i2c);
27*4882a593Smuzhiyun 
28*4882a593Smuzhiyun #else
29*4882a593Smuzhiyun 
tda665x_attach(struct dvb_frontend * fe,const struct tda665x_config * config,struct i2c_adapter * i2c)30*4882a593Smuzhiyun static inline struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe,
31*4882a593Smuzhiyun 						  const struct tda665x_config *config,
32*4882a593Smuzhiyun 						  struct i2c_adapter *i2c)
33*4882a593Smuzhiyun {
34*4882a593Smuzhiyun 	printk(KERN_WARNING "%s: Driver disabled by Kconfig\n", __func__);
35*4882a593Smuzhiyun 	return NULL;
36*4882a593Smuzhiyun }
37*4882a593Smuzhiyun 
38*4882a593Smuzhiyun #endif /* CONFIG_DVB_TDA665x */
39*4882a593Smuzhiyun 
40*4882a593Smuzhiyun #endif /* __TDA665x_H */
41