xref: /openbmc/linux/drivers/media/tuners/qt1010.h (revision f3d7c2cd)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  *  Driver for Quantek QT1010 silicon tuner
4  *
5  *  Copyright (C) 2006 Antti Palosaari <crope@iki.fi>
6  *                     Aapo Tahkola <aet@rasterburn.org>
7  */
8 
9 #ifndef QT1010_H
10 #define QT1010_H
11 
12 #include <media/dvb_frontend.h>
13 
14 struct qt1010_config {
15 	u8 i2c_address;
16 };
17 
18 /**
19  * qt1010_attach() - Attach a qt1010 tuner to the supplied frontend structure
20  *
21  * @fe:   frontend to attach to
22  * @i2c:  i2c adapter to use
23  * @cfg:  tuner hw based configuration
24  * @return fe  pointer on success, NULL on failure
25  */
26 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_QT1010)
27 extern struct dvb_frontend *qt1010_attach(struct dvb_frontend *fe,
28 					  struct i2c_adapter *i2c,
29 					  struct qt1010_config *cfg);
30 #else
31 static inline struct dvb_frontend *qt1010_attach(struct dvb_frontend *fe,
32 						 struct i2c_adapter *i2c,
33 						 struct qt1010_config *cfg)
34 {
35 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
36 	return NULL;
37 }
38 #endif // CONFIG_MEDIA_TUNER_QT1010
39 
40 #endif
41