1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Support for LGDT3306A - 8VSB/QAM-B
5 * Copyright (C) 2013,2014 Fred Richter <frichter@hauppauge.com>
6 * based on lgdt3305.[ch] by Michael Krufky
12 #include <linux/i2c.h>
13 #include <media/dvb_frontend.h>
16 enum lgdt3306a_mpeg_mode
{
17 LGDT3306A_MPEG_PARALLEL
= 0,
18 LGDT3306A_MPEG_SERIAL
= 1,
21 enum lgdt3306a_tp_clock_edge
{
22 LGDT3306A_TPCLK_RISING_EDGE
= 0,
23 LGDT3306A_TPCLK_FALLING_EDGE
= 1,
26 enum lgdt3306a_tp_valid_polarity
{
27 LGDT3306A_TP_VALID_LOW
= 0,
28 LGDT3306A_TP_VALID_HIGH
= 1,
31 struct lgdt3306a_config
{
34 /* user defined IF frequency in KHz */
38 /* disable i2c repeater - 0:repeater enabled 1:repeater disabled */
39 unsigned int deny_i2c_rptr
:1;
41 /* spectral inversion - 0:disabled 1:enabled */
42 unsigned int spectral_inversion
:1;
44 enum lgdt3306a_mpeg_mode mpeg_mode
;
45 enum lgdt3306a_tp_clock_edge tpclk_edge
;
46 enum lgdt3306a_tp_valid_polarity tpvalid_polarity
;
48 /* demod clock freq in MHz; 24 or 25 supported */
51 /* returned by driver if using i2c bus multiplexing */
52 struct dvb_frontend
**fe
;
53 struct i2c_adapter
**i2c_adapter
;
56 #if IS_REACHABLE(CONFIG_DVB_LGDT3306A)
57 struct dvb_frontend
*lgdt3306a_attach(const struct lgdt3306a_config
*config
,
58 struct i2c_adapter
*i2c_adap
);
61 struct dvb_frontend
*lgdt3306a_attach(const struct lgdt3306a_config
*config
,
62 struct i2c_adapter
*i2c_adap
)
64 printk(KERN_WARNING
"%s: driver disabled by Kconfig\n", __func__
);
67 #endif /* CONFIG_DVB_LGDT3306A */
69 #endif /* _LGDT3306A_H_ */