1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Samsung s5h1432 VSB/QAM demodulator driver
5 * Copyright (C) 2009 Bill Liu <Bill.Liu@Conexant.com>
11 #include <linux/dvb/frontend.h>
13 #define S5H1432_I2C_TOP_ADDR (0x02 >> 1)
15 #define TAIWAN_HI_IF_FREQ_44_MHZ 44000000
16 #define EUROPE_HI_IF_FREQ_36_MHZ 36000000
17 #define IF_FREQ_6_MHZ 6000000
18 #define IF_FREQ_3point3_MHZ 3300000
19 #define IF_FREQ_3point5_MHZ 3500000
20 #define IF_FREQ_4_MHZ 4000000
22 struct s5h1432_config
{
24 /* serial/parallel output */
25 #define S5H1432_PARALLEL_OUTPUT 0
26 #define S5H1432_SERIAL_OUTPUT 1
30 #define S5H1432_GPIO_OFF 0
31 #define S5H1432_GPIO_ON 1
34 /* MPEG signal timing */
35 #define S5H1432_MPEGTIMING_CONTINUOUS_INVERTING_CLOCK 0
36 #define S5H1432_MPEGTIMING_CONTINUOUS_NONINVERTING_CLOCK 1
37 #define S5H1432_MPEGTIMING_NONCONTINUOUS_INVERTING_CLOCK 2
38 #define S5H1432_MPEGTIMING_NONCONTINUOUS_NONINVERTING_CLOCK 3
41 /* IF Freq for QAM and VSB in KHz */
42 #define S5H1432_IF_3250 3250
43 #define S5H1432_IF_3500 3500
44 #define S5H1432_IF_4000 4000
45 #define S5H1432_IF_5380 5380
46 #define S5H1432_IF_44000 44000
47 #define S5H1432_VSB_IF_DEFAULT s5h1432_IF_44000
48 #define S5H1432_QAM_IF_DEFAULT s5h1432_IF_44000
52 /* Spectral Inversion */
53 #define S5H1432_INVERSION_OFF 0
54 #define S5H1432_INVERSION_ON 1
57 /* Return lock status based on tuner lock, or demod lock */
58 #define S5H1432_TUNERLOCKING 0
59 #define S5H1432_DEMODLOCKING 1
63 #if IS_REACHABLE(CONFIG_DVB_S5H1432)
64 extern struct dvb_frontend
*s5h1432_attach(const struct s5h1432_config
*config
,
65 struct i2c_adapter
*i2c
);
67 static inline struct dvb_frontend
*s5h1432_attach(const struct s5h1432_config
69 struct i2c_adapter
*i2c
)
71 printk(KERN_WARNING
"%s: driver disabled by Kconfig\n", __func__
);
74 #endif /* CONFIG_DVB_s5h1432 */
76 #endif /* __s5h1432_H__ */