2 * Driver for Micronas DVB-T drx397xD demodulator
4 * Copyright (C) 2007 Henk vergonet <Henk.Vergonet@gmail.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=
22 #ifndef _DRX397XD_H_INCLUDED
23 #define _DRX397XD_H_INCLUDED
25 #include <linux/dvb/frontend.h>
27 #define DRX_F_STEPSIZE 166667
28 #define DRX_F_OFFSET 36000000
30 #define I2C_ADR_C0(x) \
33 (((u32)(x) & (u32)0x000000ffUL) ) | \
34 (((u32)(x) & (u32)0x0000ff00UL) << 16) | \
35 (((u32)(x) & (u32)0x0fff0000UL) >> 8) | \
36 ( (u32)0x00c00000UL) \
40 #define I2C_ADR_E0(x) \
43 (((u32)(x) & (u32)0x000000ffUL) ) | \
44 (((u32)(x) & (u32)0x0000ff00UL) << 16) | \
45 (((u32)(x) & (u32)0x0fff0000UL) >> 8) | \
46 ( (u32)0x00e00000UL) \
50 struct drx397xD_CfgRfAgc /* 0x7c */
57 struct drx397xD_CfgIfAgc /* 0x68 */
78 struct drx397xD_config
80 /* demodulator's I2C address */
81 u8 demod_address; /* 0x0f */
83 struct drx397xD_CfgIfAgc ifagc; /* 0x68 */
84 struct drx397xD_CfgRfAgc rfagc; /* 0x7c */
87 /* HI_CfgCommand parameters */
88 u16 w50, w52, /* w54, */ w56;
95 u32 f_if; /* d14: intermediate frequency [Hz] */
96 /* 36000000 on Cinergy 2400i DT */
97 /* 42800000 on Pinnacle Hybrid PRO 330e */
99 u16 f_osc; /* s66: 48000 oscillator frequency [kHz] */
110 /* used for signal strength calculations in
111 drx397x_read_signal_strength
118 #if defined(CONFIG_DVB_DRX397XD) || (defined(CONFIG_DVB_DRX397XD_MODULE) && defined(MODULE))
119 extern struct dvb_frontend* drx397xD_attach(const struct drx397xD_config *config,
120 struct i2c_adapter *i2c);
122 static inline struct dvb_frontend* drx397xD_attach(const struct drx397xD_config *config,
123 struct i2c_adapter *i2c)
125 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
128 #endif /* CONFIG_DVB_DRX397XD */
130 #endif /* _DRX397XD_H_INCLUDED */