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