xref: /OK3568_Linux_fs/kernel/drivers/media/dvb-frontends/lgs8gl5.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun     Legend Silicon LGS-8GL5 DMB-TH OFDM demodulator driver
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun     Copyright (C) 2008 Sirius International (Hong Kong) Limited
6*4882a593Smuzhiyun 	Timothy Lee <timothy.lee@siriushk.com>
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun */
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun #ifndef LGS8GL5_H
12*4882a593Smuzhiyun #define LGS8GL5_H
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun #include <linux/dvb/frontend.h>
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun struct lgs8gl5_config {
17*4882a593Smuzhiyun 	/* the demodulator's i2c address */
18*4882a593Smuzhiyun 	u8 demod_address;
19*4882a593Smuzhiyun };
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun #if IS_REACHABLE(CONFIG_DVB_LGS8GL5)
22*4882a593Smuzhiyun extern struct dvb_frontend *lgs8gl5_attach(
23*4882a593Smuzhiyun 	const struct lgs8gl5_config *config, struct i2c_adapter *i2c);
24*4882a593Smuzhiyun #else
lgs8gl5_attach(const struct lgs8gl5_config * config,struct i2c_adapter * i2c)25*4882a593Smuzhiyun static inline struct dvb_frontend *lgs8gl5_attach(
26*4882a593Smuzhiyun 	const struct lgs8gl5_config *config, struct i2c_adapter *i2c) {
27*4882a593Smuzhiyun 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
28*4882a593Smuzhiyun 	return NULL;
29*4882a593Smuzhiyun }
30*4882a593Smuzhiyun #endif /* CONFIG_DVB_LGS8GL5 */
31*4882a593Smuzhiyun 
32*4882a593Smuzhiyun #endif /* LGS8GL5_H */
33