xref: /linux/drivers/media/dvb-frontends/drxd.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * drxd.h: DRXD DVB-T demodulator driver
4  *
5  * Copyright (C) 2005-2007 Micronas
6  */
7 
8 #ifndef _DRXD_H_
9 #define _DRXD_H_
10 
11 #include <linux/types.h>
12 #include <linux/i2c.h>
13 
14 struct drxd_config {
15 	u8 index;
16 
17 	u8 pll_address;
18 	u8 pll_type;
19 #define DRXD_PLL_NONE     0
20 #define DRXD_PLL_DTT7520X 1
21 #define DRXD_PLL_MT3X0823 2
22 
23 	u32 clock;
24 	u8 insert_rs_byte;
25 
26 	u8 demod_address;
27 	u8 demoda_address;
28 	u8 demod_revision;
29 
30 	/* If the tuner is not behind an i2c gate, be sure to flip this bit
31 	   or else the i2c bus could get wedged */
32 	u8 disable_i2c_gate_ctrl;
33 
34 	u32 IF;
35 	 s16(*osc_deviation) (void *priv, s16 dev, int flag);
36 };
37 
38 #if IS_REACHABLE(CONFIG_DVB_DRXD)
39 extern
40 struct dvb_frontend *drxd_attach(const struct drxd_config *config,
41 				 void *priv, struct i2c_adapter *i2c,
42 				 struct device *dev);
43 #else
44 static inline
45 struct dvb_frontend *drxd_attach(const struct drxd_config *config,
46 				 void *priv, struct i2c_adapter *i2c,
47 				 struct device *dev)
48 {
49 	printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
50 	       __func__);
51 	return NULL;
52 }
53 #endif
54 
55 #endif
56