Ralph Metzler | 126f1e6 | 2011-03-12 23:44:33 -0500 | [diff] [blame] | 1 | /* |
| 2 | * drxd.h: DRXD DVB-T demodulator driver |
| 3 | * |
| 4 | * Copyright (C) 2005-2007 Micronas |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * version 2 only, as published by the Free Software Foundation. |
| 9 | * |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 20 | * 02110-1301, USA |
| 21 | * Or, point your browser to http://www.gnu.org/copyleft/gpl.html |
| 22 | */ |
| 23 | |
| 24 | #ifndef _DRXD_H_ |
| 25 | #define _DRXD_H_ |
| 26 | |
Mauro Carvalho Chehab | 782d8b7 | 2013-03-21 16:11:54 -0300 | [diff] [blame] | 27 | #include <linux/kconfig.h> |
Ralph Metzler | 126f1e6 | 2011-03-12 23:44:33 -0500 | [diff] [blame] | 28 | #include <linux/types.h> |
| 29 | #include <linux/i2c.h> |
| 30 | |
Devin Heitmueller | 6cacdd4 | 2011-03-24 13:44:01 -0300 | [diff] [blame] | 31 | struct drxd_config { |
Ralph Metzler | 126f1e6 | 2011-03-12 23:44:33 -0500 | [diff] [blame] | 32 | u8 index; |
| 33 | |
| 34 | u8 pll_address; |
| 35 | u8 pll_type; |
| 36 | #define DRXD_PLL_NONE 0 |
| 37 | #define DRXD_PLL_DTT7520X 1 |
| 38 | #define DRXD_PLL_MT3X0823 2 |
| 39 | |
| 40 | u32 clock; |
Devin Heitmueller | ba96796 | 2011-03-13 01:54:02 -0300 | [diff] [blame] | 41 | u8 insert_rs_byte; |
Ralph Metzler | 126f1e6 | 2011-03-12 23:44:33 -0500 | [diff] [blame] | 42 | |
| 43 | u8 demod_address; |
| 44 | u8 demoda_address; |
| 45 | u8 demod_revision; |
| 46 | |
Devin Heitmueller | 6b142b3 | 2011-03-13 02:02:01 -0300 | [diff] [blame] | 47 | /* If the tuner is not behind an i2c gate, be sure to flip this bit |
| 48 | or else the i2c bus could get wedged */ |
| 49 | u8 disable_i2c_gate_ctrl; |
| 50 | |
Ralph Metzler | 126f1e6 | 2011-03-12 23:44:33 -0500 | [diff] [blame] | 51 | u32 IF; |
Devin Heitmueller | 6cacdd4 | 2011-03-24 13:44:01 -0300 | [diff] [blame] | 52 | s16(*osc_deviation) (void *priv, s16 dev, int flag); |
Ralph Metzler | 126f1e6 | 2011-03-12 23:44:33 -0500 | [diff] [blame] | 53 | }; |
| 54 | |
Arnd Bergmann | 9b17452 | 2015-02-18 14:12:42 -0300 | [diff] [blame] | 55 | #if IS_REACHABLE(CONFIG_DVB_DRXD) |
Ralph Metzler | 126f1e6 | 2011-03-12 23:44:33 -0500 | [diff] [blame] | 56 | extern |
| 57 | struct dvb_frontend *drxd_attach(const struct drxd_config *config, |
| 58 | void *priv, struct i2c_adapter *i2c, |
| 59 | struct device *dev); |
Arnd Bergmann | 60ab5e1 | 2012-05-03 18:22:26 -0300 | [diff] [blame] | 60 | #else |
| 61 | static inline |
| 62 | struct dvb_frontend *drxd_attach(const struct drxd_config *config, |
| 63 | void *priv, struct i2c_adapter *i2c, |
| 64 | struct device *dev) |
| 65 | { |
| 66 | printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n", |
| 67 | __func__); |
| 68 | return NULL; |
| 69 | } |
| 70 | #endif |
| 71 | |
Ralph Metzler | 126f1e6 | 2011-03-12 23:44:33 -0500 | [diff] [blame] | 72 | #endif |