Malcolm Priestley | ae8dc8ee | 2012-03-07 18:11:03 -0300 | [diff] [blame] | 1 | /* |
| 2 | Driver for M88RS2000 demodulator |
| 3 | |
| 4 | This program is free software; you can redistribute it and/or modify |
| 5 | it under the terms of the GNU General Public License as published by |
| 6 | the Free Software Foundation; either version 2 of the License, or |
| 7 | (at your option) any later version. |
| 8 | |
| 9 | This program is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | GNU General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU General Public License |
| 15 | along with this program; if not, write to the Free Software |
| 16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 17 | |
| 18 | */ |
| 19 | |
| 20 | #ifndef M88RS2000_H |
| 21 | #define M88RS2000_H |
| 22 | |
Mauro Carvalho Chehab | 782d8b7 | 2013-03-21 16:11:54 -0300 | [diff] [blame] | 23 | #include <linux/kconfig.h> |
Malcolm Priestley | ae8dc8ee | 2012-03-07 18:11:03 -0300 | [diff] [blame] | 24 | #include <linux/dvb/frontend.h> |
| 25 | #include "dvb_frontend.h" |
| 26 | |
| 27 | struct m88rs2000_config { |
| 28 | /* Demodulator i2c address */ |
| 29 | u8 demod_addr; |
Malcolm Priestley | ae8dc8ee | 2012-03-07 18:11:03 -0300 | [diff] [blame] | 30 | |
| 31 | u8 *inittab; |
| 32 | |
| 33 | /* minimum delay before retuning */ |
| 34 | int min_delay_ms; |
| 35 | |
| 36 | int (*set_ts_params)(struct dvb_frontend *, int); |
| 37 | }; |
| 38 | |
| 39 | enum { |
| 40 | CALL_IS_SET_FRONTEND = 0x0, |
| 41 | CALL_IS_READ, |
| 42 | }; |
| 43 | |
Mauro Carvalho Chehab | 782d8b7 | 2013-03-21 16:11:54 -0300 | [diff] [blame] | 44 | #if IS_ENABLED(CONFIG_DVB_M88RS2000) |
Malcolm Priestley | ae8dc8ee | 2012-03-07 18:11:03 -0300 | [diff] [blame] | 45 | extern struct dvb_frontend *m88rs2000_attach( |
| 46 | const struct m88rs2000_config *config, struct i2c_adapter *i2c); |
| 47 | #else |
| 48 | static inline struct dvb_frontend *m88rs2000_attach( |
| 49 | const struct m88rs2000_config *config, struct i2c_adapter *i2c) |
| 50 | { |
| 51 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
| 52 | return NULL; |
| 53 | } |
| 54 | #endif /* CONFIG_DVB_M88RS2000 */ |
| 55 | |
Malcolm Priestley | 06af15d | 2013-12-24 13:17:12 -0300 | [diff] [blame] | 56 | #define RS2000_FE_CRYSTAL_KHZ 27000 |
| 57 | |
Malcolm Priestley | ae8dc8ee | 2012-03-07 18:11:03 -0300 | [diff] [blame] | 58 | enum { |
| 59 | DEMOD_WRITE = 0x1, |
Malcolm Priestley | ae8dc8ee | 2012-03-07 18:11:03 -0300 | [diff] [blame] | 60 | WRITE_DELAY = 0x10, |
| 61 | }; |
| 62 | #endif /* M88RS2000_H */ |