xref: /linux/drivers/media/dvb-frontends/tda826x.h (revision 2da68a77)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2   /*
3      Driver for Philips tda8262/tda8263 DVBS Silicon tuners
4 
5      (c) 2006 Andrew de Quincey
6 
7 
8   */
9 
10 #ifndef __DVB_TDA826X_H__
11 #define __DVB_TDA826X_H__
12 
13 #include <linux/i2c.h>
14 #include <media/dvb_frontend.h>
15 
16 /**
17  * tda826x_attach - Attach a tda826x tuner to the supplied frontend structure.
18  *
19  * @fe: Frontend to attach to.
20  * @addr: i2c address of the tuner.
21  * @i2c: i2c adapter to use.
22  * @has_loopthrough: Set to 1 if the card has a loopthrough RF connector.
23  *
24  * return: FE pointer on success, NULL on failure.
25  */
26 #if IS_REACHABLE(CONFIG_DVB_TDA826X)
27 extern struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe, int addr,
28 					   struct i2c_adapter *i2c,
29 					   int has_loopthrough);
30 #else
31 static inline struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe,
32 						  int addr,
33 						  struct i2c_adapter *i2c,
34 						  int has_loopthrough)
35 {
36 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
37 	return NULL;
38 }
39 #endif // CONFIG_DVB_TDA826X
40 
41 #endif // __DVB_TDA826X_H__
42