treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / media / tuners / tda8290.h
blob0a50f665e14c9345de9662951aa71ad28a3930b3
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 */
5 #ifndef __TDA8290_H__
6 #define __TDA8290_H__
8 #include <linux/i2c.h>
9 #include <media/dvb_frontend.h>
10 #include "tda18271.h"
12 enum tda8290_lna {
13 TDA8290_LNA_OFF = 0,
14 TDA8290_LNA_GP0_HIGH_ON = 1,
15 TDA8290_LNA_GP0_HIGH_OFF = 2,
16 TDA8290_LNA_ON_BRIDGE = 3,
19 struct tda829x_config {
20 enum tda8290_lna lna_cfg;
22 unsigned int probe_tuner:1;
23 #define TDA829X_PROBE_TUNER 0
24 #define TDA829X_DONT_PROBE 1
25 unsigned int no_i2c_gate:1;
26 struct tda18271_std_map *tda18271_std_map;
29 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_TDA8290)
30 extern int tda829x_probe(struct i2c_adapter *i2c_adap, u8 i2c_addr);
32 extern struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe,
33 struct i2c_adapter *i2c_adap,
34 u8 i2c_addr,
35 struct tda829x_config *cfg);
36 #else
37 static inline int tda829x_probe(struct i2c_adapter *i2c_adap, u8 i2c_addr)
39 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
40 return -EINVAL;
43 static inline struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe,
44 struct i2c_adapter *i2c_adap,
45 u8 i2c_addr,
46 struct tda829x_config *cfg)
48 printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
49 __func__);
50 return NULL;
52 #endif
54 #endif /* __TDA8290_H__ */