treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / media / tuners / tda827x.h
blob30ac9214487fe9d9a3064f51ec68671b97e24913
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 DVB Driver for Philips tda827x / tda827xa Silicon tuners
5 (c) 2005 Hartmut Hackmann
6 (c) 2007 Michael Krufky
9 */
11 #ifndef __DVB_TDA827X_H__
12 #define __DVB_TDA827X_H__
14 #include <linux/i2c.h>
15 #include <media/dvb_frontend.h>
16 #include "tda8290.h"
18 struct tda827x_config
20 /* saa7134 - provided callbacks */
21 int (*init) (struct dvb_frontend *fe);
22 int (*sleep) (struct dvb_frontend *fe);
24 /* interface to tda829x driver */
25 enum tda8290_lna config;
26 int switch_addr;
28 void (*agcf)(struct dvb_frontend *fe);
32 /**
33 * Attach a tda827x tuner to the supplied frontend structure.
35 * @param fe Frontend to attach to.
36 * @param addr i2c address of the tuner.
37 * @param i2c i2c adapter to use.
38 * @param cfg optional callback function pointers.
39 * @return FE pointer on success, NULL on failure.
41 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_TDA827X)
42 extern struct dvb_frontend* tda827x_attach(struct dvb_frontend *fe, int addr,
43 struct i2c_adapter *i2c,
44 struct tda827x_config *cfg);
45 #else
46 static inline struct dvb_frontend* tda827x_attach(struct dvb_frontend *fe,
47 int addr,
48 struct i2c_adapter *i2c,
49 struct tda827x_config *cfg)
51 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
52 return NULL;
54 #endif // CONFIG_MEDIA_TUNER_TDA827X
56 #endif // __DVB_TDA827X_H__