Igor M. Liplianin | 47220bc | 2009-03-03 11:16:40 -0300 | [diff] [blame] | 1 | /* |
| 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. |
Igor M. Liplianin | 47220bc | 2009-03-03 11:16:40 -0300 | [diff] [blame] | 19 | */ |
| 20 | |
| 21 | #ifndef __DVB_STV6110_H__ |
| 22 | #define __DVB_STV6110_H__ |
| 23 | |
| 24 | #include <linux/i2c.h> |
Mauro Carvalho Chehab | fada193 | 2017-12-28 13:03:51 -0500 | [diff] [blame] | 25 | #include <media/dvb_frontend.h> |
Igor M. Liplianin | 47220bc | 2009-03-03 11:16:40 -0300 | [diff] [blame] | 26 | |
| 27 | /* registers */ |
| 28 | #define RSTV6110_CTRL1 0 |
| 29 | #define RSTV6110_CTRL2 1 |
| 30 | #define RSTV6110_TUNING1 2 |
| 31 | #define RSTV6110_TUNING2 3 |
| 32 | #define RSTV6110_CTRL3 4 |
| 33 | #define RSTV6110_STAT1 5 |
| 34 | #define RSTV6110_STAT2 6 |
| 35 | #define RSTV6110_STAT3 7 |
| 36 | |
| 37 | struct stv6110_config { |
| 38 | u8 i2c_address; |
| 39 | u32 mclk; |
Abylay Ospan | 873688c | 2009-10-17 08:23:00 -0300 | [diff] [blame] | 40 | u8 gain; |
Igor M. Liplianin | 92782bb | 2009-07-19 17:37:09 -0300 | [diff] [blame] | 41 | u8 clk_div; /* divisor value for the output clock */ |
Igor M. Liplianin | 47220bc | 2009-03-03 11:16:40 -0300 | [diff] [blame] | 42 | }; |
| 43 | |
Arnd Bergmann | 9b17452 | 2015-02-18 14:12:42 -0300 | [diff] [blame] | 44 | #if IS_REACHABLE(CONFIG_DVB_STV6110) |
Igor M. Liplianin | 47220bc | 2009-03-03 11:16:40 -0300 | [diff] [blame] | 45 | extern struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe, |
| 46 | const struct stv6110_config *config, |
| 47 | struct i2c_adapter *i2c); |
| 48 | #else |
| 49 | static inline struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe, |
| 50 | const struct stv6110_config *config, |
| 51 | struct i2c_adapter *i2c) |
| 52 | { |
| 53 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
| 54 | return NULL; |
| 55 | } |
| 56 | #endif |
| 57 | |
| 58 | #endif |