]>
Commit | Line | Data |
---|---|---|
a6dc60ff KS |
1 | /* |
2 | * cxd2841er.h | |
3 | * | |
4 | * Sony CXD2441ER digital demodulator driver public definitions | |
5 | * | |
6 | * Copyright 2012 Sony Corporation | |
7 | * Copyright (C) 2014 NetUP Inc. | |
8 | * Copyright (C) 2014 Sergey Kozlov <serjk@netup.ru> | |
9 | * Copyright (C) 2014 Abylay Ospan <aospan@netup.ru> | |
10 | * | |
11 | * This program is free software; you can redistribute it and/or modify | |
12 | * it under the terms of the GNU General Public License as published by | |
13 | * the Free Software Foundation; either version 2 of the License, or | |
14 | * (at your option) any later version. | |
15 | * | |
16 | * This program is distributed in the hope that it will be useful, | |
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | * GNU General Public License for more details. | |
20 | */ | |
21 | ||
22 | #ifndef CXD2841ER_H | |
23 | #define CXD2841ER_H | |
24 | ||
a6dc60ff KS |
25 | #include <linux/dvb/frontend.h> |
26 | ||
03ab1bd5 DS |
27 | #define CXD2841ER_USE_GATECTRL 1 /* bit 0 */ |
28 | #define CXD2841ER_AUTO_IFHZ 2 /* bit 1 */ | |
29 | #define CXD2841ER_TS_SERIAL 4 /* bit 2 */ | |
7afe510a | 30 | #define CXD2841ER_ASCOT 8 /* bit 3 */ |
763f857e | 31 | #define CXD2841ER_EARLY_TUNE 16 /* bit 4 */ |
e3943aa6 | 32 | #define CXD2841ER_NO_WAIT_LOCK 32 /* bit 5 */ |
14fd8629 | 33 | #define CXD2841ER_NO_AGCNEG 64 /* bit 6 */ |
bf51bbb0 | 34 | #define CXD2841ER_TSBITS 128 /* bit 7 */ |
c7518d13 | 35 | |
83808c23 AO |
36 | enum cxd2841er_xtal { |
37 | SONY_XTAL_20500, /* 20.5 MHz */ | |
38 | SONY_XTAL_24000, /* 24 MHz */ | |
39 | SONY_XTAL_41000 /* 41 MHz */ | |
40 | }; | |
41 | ||
a6dc60ff KS |
42 | struct cxd2841er_config { |
43 | u8 i2c_addr; | |
83808c23 | 44 | enum cxd2841er_xtal xtal; |
050863aa | 45 | u32 flags; |
a6dc60ff KS |
46 | }; |
47 | ||
48 | #if IS_REACHABLE(CONFIG_DVB_CXD2841ER) | |
49 | extern struct dvb_frontend *cxd2841er_attach_s(struct cxd2841er_config *cfg, | |
50 | struct i2c_adapter *i2c); | |
51 | ||
3f3b48a0 | 52 | extern struct dvb_frontend *cxd2841er_attach_t_c(struct cxd2841er_config *cfg, |
a6dc60ff | 53 | struct i2c_adapter *i2c); |
a6dc60ff KS |
54 | #else |
55 | static inline struct dvb_frontend *cxd2841er_attach_s( | |
56 | struct cxd2841er_config *cfg, | |
57 | struct i2c_adapter *i2c) | |
58 | { | |
83808c23 | 59 | pr_warn("%s: driver disabled by Kconfig\n", __func__); |
a6dc60ff KS |
60 | return NULL; |
61 | } | |
62 | ||
3f3b48a0 | 63 | static inline struct dvb_frontend *cxd2841er_attach_t_c( |
83808c23 AO |
64 | struct cxd2841er_config *cfg, struct i2c_adapter *i2c) |
65 | { | |
66 | pr_warn("%s: driver disabled by Kconfig\n", __func__); | |
a6dc60ff KS |
67 | return NULL; |
68 | } | |
83808c23 | 69 | |
a6dc60ff KS |
70 | #endif |
71 | ||
72 | #endif |