-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmxl608.h
84 lines (75 loc) · 2.03 KB
/
mxl608.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* Driver for the MaxLinear MxL608 tuner
*
* Copyright (C) 2014 Sasa Savic <[email protected]>
* Copyright (C) 2018 McMCC <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __MXL608_H__
#define __MXL608_H__
#include <linux/dvb/version.h>
#include "media/dvb_frontend.h"
enum mxl608_if_freq {
MXL608_IF_3_65MHz,
MXL608_IF_4MHz,
MXL608_IF_4_1MHz,
MXL608_IF_4_15MHz,
MXL608_IF_4_5MHz,
MXL608_IF_4_57MHz,
MXL608_IF_5MHz,
MXL608_IF_5_38MHz,
MXL608_IF_6MHz,
MXL608_IF_6_28MHz,
MXL608_IF_7_2MHz,
MXL608_IF_8_25MHz,
MXL608_IF_35_25MHz,
MXL608_IF_36MHz,
MXL608_IF_36_15MHz,
MXL608_IF_36_65MHz,
MXL608_IF_44MHz,
};
enum mxl608_xtal_freq {
MXL608_XTAL_16MHz,
MXL608_XTAL_24MHz,
};
enum mxl608_agc {
MXL608_AGC_SELF,
MXL608_AGC_EXTERNAL,
};
struct mxl608_config {
enum mxl608_xtal_freq xtal_freq_hz;
enum mxl608_if_freq if_freq_hz;
enum mxl608_agc agc_type;
u8 i2c_address; /* i2c addr = 0x60 */
u8 xtal_cap;
u8 gain_level;
u8 if_out_gain_level;
u8 agc_set_point;
u8 agc_invert_pol;
u8 invert_if;
u8 loop_thru_enable;
u8 clk_out_enable;
u8 clk_out_div;
u8 clk_out_ext;
u8 xtal_sharing_mode;
u8 single_supply_3_3V;
};
#ifndef DUAL_TUNER
extern struct dvb_frontend *mxl608_attach(struct dvb_frontend *fe,
struct mxl608_config *cfg,
struct i2c_adapter *i2c);
#endif
#endif /* __MXL608_H__ */