blob: 8fa07e6a6745712e65328aab285f8b8dafd88919 [file] [log] [blame]
Igor M. Liplianin47220bc2009-03-03 11:16:40 -03001/*
2 * stv6110.h
3 *
4 * Driver for ST STV6110 satellite tuner IC.
5 *
6 * Copyright (C) 2009 NetUP Inc.
7 * Copyright (C) 2009 Igor M. Liplianin <liplianin@netup.ru>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 *
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
24
25#ifndef __DVB_STV6110_H__
26#define __DVB_STV6110_H__
27
Mauro Carvalho Chehab782d8b72013-03-21 16:11:54 -030028#include <linux/kconfig.h>
Igor M. Liplianin47220bc2009-03-03 11:16:40 -030029#include <linux/i2c.h>
30#include "dvb_frontend.h"
31
32/* registers */
33#define RSTV6110_CTRL1 0
34#define RSTV6110_CTRL2 1
35#define RSTV6110_TUNING1 2
36#define RSTV6110_TUNING2 3
37#define RSTV6110_CTRL3 4
38#define RSTV6110_STAT1 5
39#define RSTV6110_STAT2 6
40#define RSTV6110_STAT3 7
41
42struct stv6110_config {
43 u8 i2c_address;
44 u32 mclk;
Abylay Ospan873688c2009-10-17 08:23:00 -030045 u8 gain;
Igor M. Liplianin92782bb2009-07-19 17:37:09 -030046 u8 clk_div; /* divisor value for the output clock */
Igor M. Liplianin47220bc2009-03-03 11:16:40 -030047};
48
Mauro Carvalho Chehab782d8b72013-03-21 16:11:54 -030049#if IS_ENABLED(CONFIG_DVB_STV6110)
Igor M. Liplianin47220bc2009-03-03 11:16:40 -030050extern struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe,
51 const struct stv6110_config *config,
52 struct i2c_adapter *i2c);
53#else
54static inline struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe,
55 const struct stv6110_config *config,
56 struct i2c_adapter *i2c)
57{
58 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
59 return NULL;
60}
61#endif
62
63#endif