Path: blob/master/drivers/media/common/tuners/mxl5007t.h
15112 views
/*1* mxl5007t.h - driver for the MaxLinear MxL5007T silicon tuner2*3* Copyright (C) 2008 Michael Krufky <[email protected]>4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* (at your option) any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*15* You should have received a copy of the GNU General Public License16* along with this program; if not, write to the Free Software17* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.18*/1920#ifndef __MXL5007T_H__21#define __MXL5007T_H__2223#include "dvb_frontend.h"2425/* ------------------------------------------------------------------------- */2627enum mxl5007t_if_freq {28MxL_IF_4_MHZ, /* 4000000 */29MxL_IF_4_5_MHZ, /* 4500000 */30MxL_IF_4_57_MHZ, /* 4570000 */31MxL_IF_5_MHZ, /* 5000000 */32MxL_IF_5_38_MHZ, /* 5380000 */33MxL_IF_6_MHZ, /* 6000000 */34MxL_IF_6_28_MHZ, /* 6280000 */35MxL_IF_9_1915_MHZ, /* 9191500 */36MxL_IF_35_25_MHZ, /* 35250000 */37MxL_IF_36_15_MHZ, /* 36150000 */38MxL_IF_44_MHZ, /* 44000000 */39};4041enum mxl5007t_xtal_freq {42MxL_XTAL_16_MHZ, /* 16000000 */43MxL_XTAL_20_MHZ, /* 20000000 */44MxL_XTAL_20_25_MHZ, /* 20250000 */45MxL_XTAL_20_48_MHZ, /* 20480000 */46MxL_XTAL_24_MHZ, /* 24000000 */47MxL_XTAL_25_MHZ, /* 25000000 */48MxL_XTAL_25_14_MHZ, /* 25140000 */49MxL_XTAL_27_MHZ, /* 27000000 */50MxL_XTAL_28_8_MHZ, /* 28800000 */51MxL_XTAL_32_MHZ, /* 32000000 */52MxL_XTAL_40_MHZ, /* 40000000 */53MxL_XTAL_44_MHZ, /* 44000000 */54MxL_XTAL_48_MHZ, /* 48000000 */55MxL_XTAL_49_3811_MHZ, /* 49381100 */56};5758enum mxl5007t_clkout_amp {59MxL_CLKOUT_AMP_0_94V = 0,60MxL_CLKOUT_AMP_0_53V = 1,61MxL_CLKOUT_AMP_0_37V = 2,62MxL_CLKOUT_AMP_0_28V = 3,63MxL_CLKOUT_AMP_0_23V = 4,64MxL_CLKOUT_AMP_0_20V = 5,65MxL_CLKOUT_AMP_0_17V = 6,66MxL_CLKOUT_AMP_0_15V = 7,67};6869struct mxl5007t_config {70s32 if_diff_out_level;71enum mxl5007t_clkout_amp clk_out_amp;72enum mxl5007t_xtal_freq xtal_freq_hz;73enum mxl5007t_if_freq if_freq_hz;74unsigned int invert_if:1;75unsigned int loop_thru_enable:1;76unsigned int clk_out_enable:1;77};7879#if defined(CONFIG_MEDIA_TUNER_MXL5007T) || (defined(CONFIG_MEDIA_TUNER_MXL5007T_MODULE) && defined(MODULE))80extern struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe,81struct i2c_adapter *i2c, u8 addr,82struct mxl5007t_config *cfg);83#else84static inline struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe,85struct i2c_adapter *i2c,86u8 addr,87struct mxl5007t_config *cfg)88{89printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);90return NULL;91}92#endif9394#endif /* __MXL5007T_H__ */9596/*97* Overrides for Emacs so that we follow Linus's tabbing style.98* ---------------------------------------------------------------------------99* Local variables:100* c-basic-offset: 8101* End:102*/103104105106