0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef __AU8522_H__
0011 #define __AU8522_H__
0012
0013 #include <linux/dvb/frontend.h>
0014
0015 enum au8522_if_freq {
0016 AU8522_IF_6MHZ = 0,
0017 AU8522_IF_4MHZ,
0018 AU8522_IF_3_25MHZ,
0019 };
0020
0021 struct au8522_led_config {
0022 u16 vsb8_strong;
0023 u16 qam64_strong;
0024 u16 qam256_strong;
0025
0026 u16 gpio_output;
0027
0028 u16 gpio_output_enable;
0029 u16 gpio_output_disable;
0030
0031 u16 gpio_leds;
0032 u8 *led_states;
0033 unsigned int num_led_states;
0034 };
0035
0036 struct au8522_config {
0037
0038 u8 demod_address;
0039
0040
0041 #define AU8522_TUNERLOCKING 0
0042 #define AU8522_DEMODLOCKING 1
0043 u8 status_mode;
0044
0045 struct au8522_led_config *led_cfg;
0046
0047 enum au8522_if_freq vsb_if;
0048 enum au8522_if_freq qam_if;
0049 };
0050
0051 #if IS_REACHABLE(CONFIG_DVB_AU8522_DTV)
0052 extern struct dvb_frontend *au8522_attach(const struct au8522_config *config,
0053 struct i2c_adapter *i2c);
0054 #else
0055 static inline
0056 struct dvb_frontend *au8522_attach(const struct au8522_config *config,
0057 struct i2c_adapter *i2c)
0058 {
0059 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0060 return NULL;
0061 }
0062 #endif
0063
0064
0065 enum au8522_video_input {
0066 AU8522_COMPOSITE_CH1 = 1,
0067 AU8522_COMPOSITE_CH2,
0068 AU8522_COMPOSITE_CH3,
0069 AU8522_COMPOSITE_CH4,
0070 AU8522_COMPOSITE_CH4_SIF,
0071 AU8522_SVIDEO_CH13,
0072 AU8522_SVIDEO_CH24,
0073 };
0074
0075 enum au8522_audio_input {
0076 AU8522_AUDIO_NONE,
0077 AU8522_AUDIO_SIF,
0078 };
0079 #endif