0001
0002
0003
0004
0005 #ifndef __TEA5767_H__
0006 #define __TEA5767_H__
0007
0008 #include <linux/i2c.h>
0009 #include <media/dvb_frontend.h>
0010
0011 enum tea5767_xtal {
0012 TEA5767_LOW_LO_32768 = 0,
0013 TEA5767_HIGH_LO_32768 = 1,
0014 TEA5767_LOW_LO_13MHz = 2,
0015 TEA5767_HIGH_LO_13MHz = 3,
0016 };
0017
0018 struct tea5767_ctrl {
0019 unsigned int port1:1;
0020 unsigned int port2:1;
0021 unsigned int high_cut:1;
0022 unsigned int st_noise:1;
0023 unsigned int soft_mute:1;
0024 unsigned int japan_band:1;
0025 unsigned int deemph_75:1;
0026 unsigned int pllref:1;
0027 enum tea5767_xtal xtal_freq;
0028 };
0029
0030 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_TEA5767)
0031 extern int tea5767_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr);
0032
0033 extern struct dvb_frontend *tea5767_attach(struct dvb_frontend *fe,
0034 struct i2c_adapter* i2c_adap,
0035 u8 i2c_addr);
0036 #else
0037 static inline int tea5767_autodetection(struct i2c_adapter* i2c_adap,
0038 u8 i2c_addr)
0039 {
0040 printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
0041 __func__);
0042 return -EINVAL;
0043 }
0044
0045 static inline struct dvb_frontend *tea5767_attach(struct dvb_frontend *fe,
0046 struct i2c_adapter* i2c_adap,
0047 u8 i2c_addr)
0048 {
0049 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0050 return NULL;
0051 }
0052 #endif
0053
0054 #endif