1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 Samsung S5H1409 VSB/QAM demodulator driver
5 Copyright (C) 2006 Steven Toth <stoth@linuxtv.org>
13 #include <linux/dvb/frontend.h>
15 struct s5h1409_config
{
16 /* the demodulator's i2c address */
19 /* serial/parallel output */
20 #define S5H1409_PARALLEL_OUTPUT 0
21 #define S5H1409_SERIAL_OUTPUT 1
25 #define S5H1409_GPIO_OFF 0
26 #define S5H1409_GPIO_ON 1
29 /* IF Freq for QAM in KHz, VSB is hardcoded to 5380 */
32 /* Spectral Inversion */
33 #define S5H1409_INVERSION_OFF 0
34 #define S5H1409_INVERSION_ON 1
37 /* Return lock status based on tuner lock, or demod lock */
38 #define S5H1409_TUNERLOCKING 0
39 #define S5H1409_DEMODLOCKING 1
42 /* MPEG signal timing */
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
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
57 #if IS_REACHABLE(CONFIG_DVB_S5H1409)
58 extern struct dvb_frontend
*s5h1409_attach(const struct s5h1409_config
*config
,
59 struct i2c_adapter
*i2c
);
61 static inline struct dvb_frontend
*s5h1409_attach(
62 const struct s5h1409_config
*config
,
63 struct i2c_adapter
*i2c
)
65 printk(KERN_WARNING
"%s: driver disabled by Kconfig\n", __func__
);
68 #endif /* CONFIG_DVB_S5H1409 */
70 #endif /* __S5H1409_H__ */