0001
0002
0003
0004
0005 #ifndef __TEA5761_H__
0006 #define __TEA5761_H__
0007
0008 #include <linux/i2c.h>
0009 #include <media/dvb_frontend.h>
0010
0011 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_TEA5761)
0012 extern int tea5761_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr);
0013
0014 extern struct dvb_frontend *tea5761_attach(struct dvb_frontend *fe,
0015 struct i2c_adapter* i2c_adap,
0016 u8 i2c_addr);
0017 #else
0018 static inline int tea5761_autodetection(struct i2c_adapter* i2c_adap,
0019 u8 i2c_addr)
0020 {
0021 printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
0022 __func__);
0023 return -EINVAL;
0024 }
0025
0026 static inline struct dvb_frontend *tea5761_attach(struct dvb_frontend *fe,
0027 struct i2c_adapter* i2c_adap,
0028 u8 i2c_addr)
0029 {
0030 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0031 return NULL;
0032 }
0033 #endif
0034
0035 #endif