0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef __DVB_HELENE_H__
0013 #define __DVB_HELENE_H__
0014
0015 #include <linux/dvb/frontend.h>
0016 #include <linux/i2c.h>
0017
0018 enum helene_xtal {
0019 SONY_HELENE_XTAL_16000,
0020 SONY_HELENE_XTAL_20500,
0021 SONY_HELENE_XTAL_24000,
0022 SONY_HELENE_XTAL_41000
0023 };
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 struct helene_config {
0036 u8 i2c_address;
0037 u8 xtal_freq_mhz;
0038 void *set_tuner_priv;
0039 int (*set_tuner_callback)(void *, int);
0040 enum helene_xtal xtal;
0041
0042 struct dvb_frontend *fe;
0043 };
0044
0045 #if IS_REACHABLE(CONFIG_DVB_HELENE)
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055 extern struct dvb_frontend *helene_attach(struct dvb_frontend *fe,
0056 const struct helene_config *config,
0057 struct i2c_adapter *i2c);
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068 extern struct dvb_frontend *helene_attach_s(struct dvb_frontend *fe,
0069 const struct helene_config *config,
0070 struct i2c_adapter *i2c);
0071 #else
0072 static inline struct dvb_frontend *helene_attach(struct dvb_frontend *fe,
0073 const struct helene_config *config,
0074 struct i2c_adapter *i2c)
0075 {
0076 pr_warn("%s: driver disabled by Kconfig\n", __func__);
0077 return NULL;
0078 }
0079 static inline struct dvb_frontend *helene_attach_s(struct dvb_frontend *fe,
0080 const struct helene_config *config,
0081 struct i2c_adapter *i2c)
0082 {
0083 pr_warn("%s: driver disabled by Kconfig\n", __func__);
0084 return NULL;
0085 }
0086 #endif
0087
0088 #endif