[ARM] pxa: update defconfig for Verdex Pro
[linux-2.6/verdex.git] / drivers / media / dvb / frontends / drx397xD.h
blobba05d17290c633e51fdc30e0dc0055d9702affeb
1 /*
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) \
31 ( cpu_to_le32( \
32 (u32)( \
33 (((u32)(x) & (u32)0x000000ffUL) ) | \
34 (((u32)(x) & (u32)0x0000ff00UL) << 16) | \
35 (((u32)(x) & (u32)0x0fff0000UL) >> 8) | \
36 ( (u32)0x00c00000UL) \
37 )) \
40 #define I2C_ADR_E0(x) \
41 ( cpu_to_le32( \
42 (u32)( \
43 (((u32)(x) & (u32)0x000000ffUL) ) | \
44 (((u32)(x) & (u32)0x0000ff00UL) << 16) | \
45 (((u32)(x) & (u32)0x0fff0000UL) >> 8) | \
46 ( (u32)0x00e00000UL) \
47 )) \
50 struct drx397xD_CfgRfAgc /* 0x7c */
52 int d00; /* 2 */
53 u16 w04;
54 u16 w06;
57 struct drx397xD_CfgIfAgc /* 0x68 */
59 int d00; /* 0 */
60 u16 w04; /* 0 */
61 u16 w06;
62 u16 w08;
63 u16 w0A;
64 u16 w0C;
67 struct drx397xD_s20 {
68 int d04;
69 u32 d18;
70 u32 d1C;
71 u32 d20;
72 u32 d14;
73 u32 d24;
74 u32 d0C;
75 u32 d08;
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 */
85 u32 s20d24;
87 /* HI_CfgCommand parameters */
88 u16 w50, w52, /* w54, */ w56;
90 int d5C;
91 int d60;
92 int d48;
93 int d28;
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] */
101 u16 w92; /* 20000 */
103 u16 wA0;
104 u16 w98;
105 u16 w9A;
107 u16 w9C; /* 0xe0 */
108 u16 w9E; /* 0x00 */
110 /* used for signal strength calculations in
111 drx397x_read_signal_strength
113 u16 ss78; // 2200
114 u16 ss7A; // 150
115 u16 ss76; // 820
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);
121 #else
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__);
126 return NULL;
128 #endif /* CONFIG_DVB_DRX397XD */
130 #endif /* _DRX397XD_H_INCLUDED */