1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Driver for Zarlink DVB-T MT352 demodulator
5 * Written by Holger Waechtler <holger@qanu.de>
6 * and Daniel Mack <daniel@qanu.de>
8 * AVerMedia AVerTV DVB-T 771 support by
9 * Wolfram Joost <dbox2@frokaschwei.de>
11 * Support for Samsung TDTC9251DH01C(M) tuner
12 * Copyright (C) 2004 Antonio Mancuso <antonio.mancuso@digitaltelevision.it>
13 * Amauri Celani <acelani@essegi.net>
15 * DVICO FusionHDTV DVB-T1 and DVICO FusionHDTV DVB-T Lite support by
16 * Christopher Pascoe <c.pascoe@itee.uq.edu.au>
22 #include <linux/dvb/frontend.h>
26 /* the demodulator's i2c address */
29 /* frequencies in kHz */
30 int adc_clock
; // default: 20480
31 int if2
; // default: 36166
33 /* set if no pll is connected to the secondary i2c bus */
36 /* Initialise the demodulator and PLL. Cannot be NULL */
37 int (*demod_init
)(struct dvb_frontend
* fe
);
40 #if IS_REACHABLE(CONFIG_DVB_MT352)
41 extern struct dvb_frontend
* mt352_attach(const struct mt352_config
* config
,
42 struct i2c_adapter
* i2c
);
44 static inline struct dvb_frontend
* mt352_attach(const struct mt352_config
* config
,
45 struct i2c_adapter
* i2c
)
47 printk(KERN_WARNING
"%s: driver disabled by Kconfig\n", __func__
);
50 #endif // CONFIG_DVB_MT352
52 static inline int mt352_write(struct dvb_frontend
*fe
, const u8 buf
[], int len
) {
55 r
= fe
->ops
.write(fe
, buf
, len
);