1 /**
2  * Driver for Sharp IX2505V (marked B0017) DVB-S silicon tuner
3  *
4  * Copyright (C) 2010 Malcolm Priestley
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License Version 2, as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  */
15 
16 #ifndef DVB_IX2505V_H
17 #define DVB_IX2505V_H
18 
19 #include <linux/i2c.h>
20 #include "dvb_frontend.h"
21 
22 /**
23  * Attach a ix2505v tuner to the supplied frontend structure.
24  *
25  * @param fe Frontend to attach to.
26  * @param config ix2505v_config structure
27  * @return FE pointer on success, NULL on failure.
28  */
29 
30 struct ix2505v_config {
31 	u8 tuner_address;
32 
33 	/*Baseband AMP gain control 0/1=0dB(default) 2=-2bB 3=-4dB */
34 	u8 tuner_gain;
35 
36 	/*Charge pump output +/- 0=120 1=260 2=555 3=1200(default) */
37 	u8 tuner_chargepump;
38 
39 	/* delay after tune */
40 	int min_delay_ms;
41 
42 	/* disables reads*/
43 	u8 tuner_write_only;
44 
45 };
46 
47 #if IS_REACHABLE(CONFIG_DVB_IX2505V)
48 extern struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
49 	const struct ix2505v_config *config, struct i2c_adapter *i2c);
50 #else
51 static inline struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
52 	const struct ix2505v_config *config, struct i2c_adapter *i2c)
53 {
54 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
55 	return NULL;
56 }
57 #endif
58 
59 #endif /* DVB_IX2505V_H */
60