Merge tag 'io_uring-5.11-2021-01-16' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / media / dvb-frontends / mt352.h
blobacb1c33748f8991499a6da2f2a7ccb4b88d4936d
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
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>
19 #ifndef MT352_H
20 #define MT352_H
22 #include <linux/dvb/frontend.h>
24 struct mt352_config
26 /* the demodulator's i2c address */
27 u8 demod_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 */
34 int no_tuner;
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);
43 #else
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__);
48 return NULL;
50 #endif // CONFIG_DVB_MT352
52 static inline int mt352_write(struct dvb_frontend *fe, const u8 buf[], int len) {
53 int r = 0;
54 if (fe->ops.write)
55 r = fe->ops.write(fe, buf, len);
56 return r;
59 #endif // MT352_H