xref: /OK3568_Linux_fs/kernel/drivers/media/tuners/tda18218.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * NXP TDA18218HN silicon tuner driver
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
6*4882a593Smuzhiyun  */
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun #ifndef TDA18218_H
9*4882a593Smuzhiyun #define TDA18218_H
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun #include <media/dvb_frontend.h>
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun struct tda18218_config {
14*4882a593Smuzhiyun 	u8 i2c_address;
15*4882a593Smuzhiyun 	u8 i2c_wr_max;
16*4882a593Smuzhiyun 	u8 loop_through:1;
17*4882a593Smuzhiyun };
18*4882a593Smuzhiyun 
19*4882a593Smuzhiyun #if IS_REACHABLE(CONFIG_MEDIA_TUNER_TDA18218)
20*4882a593Smuzhiyun extern struct dvb_frontend *tda18218_attach(struct dvb_frontend *fe,
21*4882a593Smuzhiyun 	struct i2c_adapter *i2c, struct tda18218_config *cfg);
22*4882a593Smuzhiyun #else
tda18218_attach(struct dvb_frontend * fe,struct i2c_adapter * i2c,struct tda18218_config * cfg)23*4882a593Smuzhiyun static inline struct dvb_frontend *tda18218_attach(struct dvb_frontend *fe,
24*4882a593Smuzhiyun 	struct i2c_adapter *i2c, struct tda18218_config *cfg)
25*4882a593Smuzhiyun {
26*4882a593Smuzhiyun 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
27*4882a593Smuzhiyun 	return NULL;
28*4882a593Smuzhiyun }
29*4882a593Smuzhiyun #endif
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun #endif
32