Path: blob/master/drivers/media/common/tuners/mxl5005s.h
15112 views
/*1MaxLinear MXL5005S VSB/QAM/DVBT tuner driver23Copyright (C) 2008 MaxLinear4Copyright (C) 2008 Steven Toth <[email protected]>56This program is free software; you can redistribute it and/or modify7it under the terms of the GNU General Public License as published by8the Free Software Foundation; either version 2 of the License, or9(at your option) any later version.1011This program is distributed in the hope that it will be useful,12but WITHOUT ANY WARRANTY; without even the implied warranty of13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14GNU General Public License for more details.1516You should have received a copy of the GNU General Public License17along with this program; if not, write to the Free Software18Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.1920*/2122#ifndef __MXL5005S_H23#define __MXL5005S_H2425#include <linux/i2c.h>26#include "dvb_frontend.h"2728struct mxl5005s_config {2930/* 7 bit i2c address */31u8 i2c_address;3233#define IF_FREQ_4570000HZ 457000034#define IF_FREQ_4571429HZ 457142935#define IF_FREQ_5380000HZ 538000036#define IF_FREQ_36000000HZ 3600000037#define IF_FREQ_36125000HZ 3612500038#define IF_FREQ_36166667HZ 3616666739#define IF_FREQ_44000000HZ 4400000040u32 if_freq;4142#define CRYSTAL_FREQ_4000000HZ 400000043#define CRYSTAL_FREQ_16000000HZ 1600000044#define CRYSTAL_FREQ_25000000HZ 2500000045#define CRYSTAL_FREQ_28800000HZ 2880000046u32 xtal_freq;4748#define MXL_DUAL_AGC 049#define MXL_SINGLE_AGC 150u8 agc_mode;5152#define MXL_TF_DEFAULT 053#define MXL_TF_OFF 154#define MXL_TF_C 255#define MXL_TF_C_H 356#define MXL_TF_D 457#define MXL_TF_D_L 558#define MXL_TF_E 659#define MXL_TF_F 760#define MXL_TF_E_2 861#define MXL_TF_E_NA 962#define MXL_TF_G 1063u8 tracking_filter;6465#define MXL_RSSI_DISABLE 066#define MXL_RSSI_ENABLE 167u8 rssi_enable;6869#define MXL_CAP_SEL_DISABLE 070#define MXL_CAP_SEL_ENABLE 171u8 cap_select;7273#define MXL_DIV_OUT_1 074#define MXL_DIV_OUT_4 175u8 div_out;7677#define MXL_CLOCK_OUT_DISABLE 078#define MXL_CLOCK_OUT_ENABLE 179u8 clock_out;8081#define MXL5005S_IF_OUTPUT_LOAD_200_OHM 20082#define MXL5005S_IF_OUTPUT_LOAD_300_OHM 30083u32 output_load;8485#define MXL5005S_TOP_5P5 5586#define MXL5005S_TOP_7P2 7287#define MXL5005S_TOP_9P2 9288#define MXL5005S_TOP_11P0 11089#define MXL5005S_TOP_12P9 12990#define MXL5005S_TOP_14P7 14791#define MXL5005S_TOP_16P8 16892#define MXL5005S_TOP_19P4 19493#define MXL5005S_TOP_21P2 21294#define MXL5005S_TOP_23P2 23295#define MXL5005S_TOP_25P2 25296#define MXL5005S_TOP_27P1 27197#define MXL5005S_TOP_29P2 29298#define MXL5005S_TOP_31P7 31799#define MXL5005S_TOP_34P9 349100u32 top;101102#define MXL_ANALOG_MODE 0103#define MXL_DIGITAL_MODE 1104u8 mod_mode;105106#define MXL_ZERO_IF 0107#define MXL_LOW_IF 1108u8 if_mode;109110/* Some boards need to override the built-in logic for determining111the gain when in QAM mode (the HVR-1600 is one such case) */112u8 qam_gain;113114/* Stuff I don't know what to do with */115u8 AgcMasterByte;116};117118#if defined(CONFIG_MEDIA_TUNER_MXL5005S) || \119(defined(CONFIG_MEDIA_TUNER_MXL5005S_MODULE) && defined(MODULE))120extern struct dvb_frontend *mxl5005s_attach(struct dvb_frontend *fe,121struct i2c_adapter *i2c,122struct mxl5005s_config *config);123#else124static inline struct dvb_frontend *mxl5005s_attach(struct dvb_frontend *fe,125struct i2c_adapter *i2c,126struct mxl5005s_config *config)127{128printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);129return NULL;130}131#endif /* CONFIG_DVB_TUNER_MXL5005S */132133#endif /* __MXL5005S_H */134135136137