brintos

brintos / linux-shallow public Read only

0
0
Text · 2.8 KiB · cb7395f Raw
123 lines · c
1/* SPDX-License-Identifier: GPL-2.0-or-later */2/*3    MaxLinear MXL5005S VSB/QAM/DVBT tuner driver4 5    Copyright (C) 2008 MaxLinear6    Copyright (C) 2008 Steven Toth <stoth@linuxtv.org>7 8 9*/10 11#ifndef __MXL5005S_H12#define __MXL5005S_H13 14#include <linux/i2c.h>15#include <media/dvb_frontend.h>16 17struct mxl5005s_config {18 19	/* 7 bit i2c address */20	u8 i2c_address;21 22#define IF_FREQ_4570000HZ    457000023#define IF_FREQ_4571429HZ    457142924#define IF_FREQ_5380000HZ    538000025#define IF_FREQ_36000000HZ  3600000026#define IF_FREQ_36125000HZ  3612500027#define IF_FREQ_36166667HZ  3616666728#define IF_FREQ_44000000HZ  4400000029	u32 if_freq;30 31#define CRYSTAL_FREQ_4000000HZ    400000032#define CRYSTAL_FREQ_16000000HZ  1600000033#define CRYSTAL_FREQ_25000000HZ  2500000034#define CRYSTAL_FREQ_28800000HZ  2880000035	u32 xtal_freq;36 37#define MXL_DUAL_AGC   038#define MXL_SINGLE_AGC 139	u8 agc_mode;40 41#define MXL_TF_DEFAULT	042#define MXL_TF_OFF	143#define MXL_TF_C	244#define MXL_TF_C_H	345#define MXL_TF_D	446#define MXL_TF_D_L	547#define MXL_TF_E	648#define MXL_TF_F	749#define MXL_TF_E_2	850#define MXL_TF_E_NA	951#define MXL_TF_G	1052	u8 tracking_filter;53 54#define MXL_RSSI_DISABLE	055#define MXL_RSSI_ENABLE		156	u8 rssi_enable;57 58#define MXL_CAP_SEL_DISABLE	059#define MXL_CAP_SEL_ENABLE	160	u8 cap_select;61 62#define MXL_DIV_OUT_1	063#define MXL_DIV_OUT_4	164	u8 div_out;65 66#define MXL_CLOCK_OUT_DISABLE	067#define MXL_CLOCK_OUT_ENABLE	168	u8 clock_out;69 70#define MXL5005S_IF_OUTPUT_LOAD_200_OHM 20071#define MXL5005S_IF_OUTPUT_LOAD_300_OHM 30072	u32 output_load;73 74#define MXL5005S_TOP_5P5   5575#define MXL5005S_TOP_7P2   7276#define MXL5005S_TOP_9P2   9277#define MXL5005S_TOP_11P0 11078#define MXL5005S_TOP_12P9 12979#define MXL5005S_TOP_14P7 14780#define MXL5005S_TOP_16P8 16881#define MXL5005S_TOP_19P4 19482#define MXL5005S_TOP_21P2 21283#define MXL5005S_TOP_23P2 23284#define MXL5005S_TOP_25P2 25285#define MXL5005S_TOP_27P1 27186#define MXL5005S_TOP_29P2 29287#define MXL5005S_TOP_31P7 31788#define MXL5005S_TOP_34P9 34989	u32 top;90 91#define MXL_ANALOG_MODE  092#define MXL_DIGITAL_MODE 193	u8 mod_mode;94 95#define MXL_ZERO_IF 096#define MXL_LOW_IF  197	u8 if_mode;98 99	/* Some boards need to override the built-in logic for determining100	   the gain when in QAM mode (the HVR-1600 is one such case) */101	u8 qam_gain;102 103	/* Stuff I don't know what to do with */104	u8 AgcMasterByte;105};106 107#if IS_REACHABLE(CONFIG_MEDIA_TUNER_MXL5005S)108extern struct dvb_frontend *mxl5005s_attach(struct dvb_frontend *fe,109					    struct i2c_adapter *i2c,110					    struct mxl5005s_config *config);111#else112static inline struct dvb_frontend *mxl5005s_attach(struct dvb_frontend *fe,113					    struct i2c_adapter *i2c,114					    struct mxl5005s_config *config)115{116	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);117	return NULL;118}119#endif /* CONFIG_DVB_TUNER_MXL5005S */120 121#endif /* __MXL5005S_H */122 123