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