treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / media / tuners / tea5767.h
blobf89607d8dc1419de87b26dc31577bff9988971d9
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 */
5 #ifndef __TEA5767_H__
6 #define __TEA5767_H__
8 #include <linux/i2c.h>
9 #include <media/dvb_frontend.h>
11 enum tea5767_xtal {
12 TEA5767_LOW_LO_32768 = 0,
13 TEA5767_HIGH_LO_32768 = 1,
14 TEA5767_LOW_LO_13MHz = 2,
15 TEA5767_HIGH_LO_13MHz = 3,
18 struct tea5767_ctrl {
19 unsigned int port1:1;
20 unsigned int port2:1;
21 unsigned int high_cut:1;
22 unsigned int st_noise:1;
23 unsigned int soft_mute:1;
24 unsigned int japan_band:1;
25 unsigned int deemph_75:1;
26 unsigned int pllref:1;
27 enum tea5767_xtal xtal_freq;
30 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_TEA5767)
31 extern int tea5767_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr);
33 extern struct dvb_frontend *tea5767_attach(struct dvb_frontend *fe,
34 struct i2c_adapter* i2c_adap,
35 u8 i2c_addr);
36 #else
37 static inline int tea5767_autodetection(struct i2c_adapter* i2c_adap,
38 u8 i2c_addr)
40 printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
41 __func__);
42 return -EINVAL;
45 static inline struct dvb_frontend *tea5767_attach(struct dvb_frontend *fe,
46 struct i2c_adapter* i2c_adap,
47 u8 i2c_addr)
49 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
50 return NULL;
52 #endif
54 #endif /* __TEA5767_H__ */