1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* 3 */ 4 5 #ifndef __TEA5761_H__ 6 #define __TEA5761_H__ 7 8 #include <linux/i2c.h> 9 #include <media/dvb_frontend.h> 10 11 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_TEA5761) 12 extern int tea5761_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr); 13 14 extern struct dvb_frontend *tea5761_attach(struct dvb_frontend *fe, 15 struct i2c_adapter* i2c_adap, 16 u8 i2c_addr); 17 #else 18 static inline int tea5761_autodetection(struct i2c_adapter* i2c_adap, 19 u8 i2c_addr) 20 { 21 printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n", 22 __func__); 23 return -EINVAL; 24 } 25 26 static inline struct dvb_frontend *tea5761_attach(struct dvb_frontend *fe, 27 struct i2c_adapter* i2c_adap, 28 u8 i2c_addr) 29 { 30 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 31 return NULL; 32 } 33 #endif 34 35 #endif /* __TEA5761_H__ */ 36