Commit | Line | Data |
---|---|---|
74ba9207 | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
89885558 ST |
2 | /* |
3 | Samsung S5H1409 VSB/QAM demodulator driver | |
4 | ||
6d897616 | 5 | Copyright (C) 2006 Steven Toth <stoth@linuxtv.org> |
89885558 | 6 | |
89885558 ST |
7 | |
8 | */ | |
9 | ||
3873dd04 MK |
10 | #ifndef __S5H1409_H__ |
11 | #define __S5H1409_H__ | |
89885558 ST |
12 | |
13 | #include <linux/dvb/frontend.h> | |
14 | ||
b7709c0d | 15 | struct s5h1409_config { |
89885558 ST |
16 | /* the demodulator's i2c address */ |
17 | u8 demod_address; | |
18 | ||
19 | /* serial/parallel output */ | |
20 | #define S5H1409_PARALLEL_OUTPUT 0 | |
21 | #define S5H1409_SERIAL_OUTPUT 1 | |
22 | u8 output_mode; | |
23 | ||
24 | /* GPIO Setting */ | |
25 | #define S5H1409_GPIO_OFF 0 | |
26 | #define S5H1409_GPIO_ON 1 | |
27 | u8 gpio; | |
28 | ||
2b03238a MK |
29 | /* IF Freq for QAM in KHz, VSB is hardcoded to 5380 */ |
30 | u16 qam_if; | |
89885558 ST |
31 | |
32 | /* Spectral Inversion */ | |
33 | #define S5H1409_INVERSION_OFF 0 | |
34 | #define S5H1409_INVERSION_ON 1 | |
35 | u8 inversion; | |
36 | ||
37 | /* Return lock status based on tuner lock, or demod lock */ | |
38 | #define S5H1409_TUNERLOCKING 0 | |
39 | #define S5H1409_DEMODLOCKING 1 | |
40 | u8 status_mode; | |
dfc1c08a ST |
41 | |
42 | /* MPEG signal timing */ | |
ad05ff09 MCC |
43 | #define S5H1409_MPEGTIMING_CONTINUOUS_INVERTING_CLOCK 0 |
44 | #define S5H1409_MPEGTIMING_CONTINUOUS_NONINVERTING_CLOCK 1 | |
45 | #define S5H1409_MPEGTIMING_NONCONTINUOUS_INVERTING_CLOCK 2 | |
46 | #define S5H1409_MPEGTIMING_NONCONTINUOUS_NONINVERTING_CLOCK 3 | |
dfc1c08a | 47 | u16 mpeg_timing; |
af5c8e15 DH |
48 | |
49 | /* HVR-1600 optimizations (to better work with MXL5005s) | |
50 | Note: some of these are likely to be folded into the generic driver | |
51 | after being regression tested with other boards */ | |
52 | #define S5H1409_HVR1600_NOOPTIMIZE 0 | |
53 | #define S5H1409_HVR1600_OPTIMIZE 1 | |
54 | u8 hvr1600_opt; | |
89885558 ST |
55 | }; |
56 | ||
9b174527 | 57 | #if IS_REACHABLE(CONFIG_DVB_S5H1409) |
b7709c0d ST |
58 | extern struct dvb_frontend *s5h1409_attach(const struct s5h1409_config *config, |
59 | struct i2c_adapter *i2c); | |
89885558 | 60 | #else |
b7709c0d ST |
61 | static inline struct dvb_frontend *s5h1409_attach( |
62 | const struct s5h1409_config *config, | |
63 | struct i2c_adapter *i2c) | |
89885558 | 64 | { |
271ddbf7 | 65 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
89885558 ST |
66 | return NULL; |
67 | } | |
3873dd04 | 68 | #endif /* CONFIG_DVB_S5H1409 */ |
89885558 | 69 | |
3873dd04 | 70 | #endif /* __S5H1409_H__ */ |