Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
lg2160.h
Go to the documentation of this file.
1 /*
2  * Support for LG2160 - ATSC/MH
3  *
4  * Copyright (C) 2010 Michael Krufky <[email protected]>
5  *
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.
10  *
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
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  *
20  */
21 
22 #ifndef _LG2160_H_
23 #define _LG2160_H_
24 
25 #include <linux/i2c.h>
26 #include "dvb_frontend.h"
27 
29  LG2160 = 0,
30  LG2161 = 1,
31 };
32 
33 #define LG2161_1019 LG2161
34 #define LG2161_1040 LG2161
35 
40 };
41 
42 #if 0
43 enum lg2161_oif {
44  LG2161_OIF_EBI2_SLA = 1,
45  LG2161_OIF_SDIO_SLA = 2,
46  LG2161_OIF_SPI_SLA = 3,
47  LG2161_OIF_SPI_MAS = 4,
48  LG2161_OIF_SERIAL_TS = 7,
49 };
50 #endif
51 
52 struct lg2160_config {
54 
55  /* user defined IF frequency in KHz */
57 
58  /* disable i2c repeater - 0:repeater enabled 1:repeater disabled */
60 
61  /* spectral inversion - 0:disabled 1:enabled */
63 
64  unsigned int output_if;
67 };
68 
69 #if defined(CONFIG_DVB_LG2160) || (defined(CONFIG_DVB_LG2160_MODULE) && \
70  defined(MODULE))
71 extern
72 struct dvb_frontend *lg2160_attach(const struct lg2160_config *config,
73  struct i2c_adapter *i2c_adap);
74 #else
75 static inline
76 struct dvb_frontend *lg2160_attach(const struct lg2160_config *config,
77  struct i2c_adapter *i2c_adap)
78 {
79  printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
80  return NULL;
81 }
82 #endif /* CONFIG_DVB_LG2160 */
83 
84 #endif /* _LG2160_H_ */