brintos

brintos / linux-shallow public Read only

0
0
Text · 1.5 KiB · acb1c33 Raw
60 lines · c
1/* SPDX-License-Identifier: GPL-2.0-or-later */2/*3 *  Driver for Zarlink DVB-T MT352 demodulator4 *5 *  Written by Holger Waechtler <holger@qanu.de>6 *	 and Daniel Mack <daniel@qanu.de>7 *8 *  AVerMedia AVerTV DVB-T 771 support by9 *       Wolfram Joost <dbox2@frokaschwei.de>10 *11 *  Support for Samsung TDTC9251DH01C(M) tuner12 *  Copyright (C) 2004 Antonio Mancuso <antonio.mancuso@digitaltelevision.it>13 *                     Amauri  Celani  <acelani@essegi.net>14 *15 *  DVICO FusionHDTV DVB-T1 and DVICO FusionHDTV DVB-T Lite support by16 *       Christopher Pascoe <c.pascoe@itee.uq.edu.au>17 */18 19#ifndef MT352_H20#define MT352_H21 22#include <linux/dvb/frontend.h>23 24struct mt352_config25{26	/* the demodulator's i2c address */27	u8 demod_address;28 29	/* frequencies in kHz */30	int adc_clock;  // default: 2048031	int if2;        // default: 3616632 33	/* set if no pll is connected to the secondary i2c bus */34	int no_tuner;35 36	/* Initialise the demodulator and PLL. Cannot be NULL */37	int (*demod_init)(struct dvb_frontend* fe);38};39 40#if IS_REACHABLE(CONFIG_DVB_MT352)41extern struct dvb_frontend* mt352_attach(const struct mt352_config* config,42					 struct i2c_adapter* i2c);43#else44static inline struct dvb_frontend* mt352_attach(const struct mt352_config* config,45					 struct i2c_adapter* i2c)46{47	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);48	return NULL;49}50#endif // CONFIG_DVB_MT35251 52static 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;57}58 59#endif // MT352_H60