blob: af107a2dd3578aa61c9591e1778d3e516c028311 [file] [log] [blame]
Malcolm Priestley1ae2c582010-08-28 18:07:37 -03001/**
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 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20#ifndef DVB_IX2505V_H
21#define DVB_IX2505V_H
22
Mauro Carvalho Chehab782d8b72013-03-21 16:11:54 -030023#include <linux/kconfig.h>
Malcolm Priestley1ae2c582010-08-28 18:07:37 -030024#include <linux/i2c.h>
25#include "dvb_frontend.h"
26
27/**
28 * Attach a ix2505v tuner to the supplied frontend structure.
29 *
30 * @param fe Frontend to attach to.
31 * @param config ix2505v_config structure
32 * @return FE pointer on success, NULL on failure.
33 */
34
35struct ix2505v_config {
36 u8 tuner_address;
37
38 /*Baseband AMP gain control 0/1=0dB(default) 2=-2bB 3=-4dB */
39 u8 tuner_gain;
40
41 /*Charge pump output +/- 0=120 1=260 2=555 3=1200(default) */
42 u8 tuner_chargepump;
43
44 /* delay after tune */
45 int min_delay_ms;
46
47 /* disables reads*/
48 u8 tuner_write_only;
49
50};
51
Arnd Bergmann9b174522015-02-18 14:12:42 -030052#if IS_REACHABLE(CONFIG_DVB_IX2505V)
Malcolm Priestley1ae2c582010-08-28 18:07:37 -030053extern struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
54 const struct ix2505v_config *config, struct i2c_adapter *i2c);
55#else
56static inline struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
57 const struct ix2505v_config *config, struct i2c_adapter *i2c)
58{
59 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
60 return NULL;
61}
62#endif
63
64#endif /* DVB_IX2505V_H */