Thomas Mair | 82041c0 | 2012-05-18 14:47:40 -0300 | [diff] [blame] | 1 | /* |
| 2 | * Realtek RTL2832 DVB-T demodulator driver |
| 3 | * |
| 4 | * Copyright (C) 2012 Thomas Mair <thomas.mair86@gmail.com> |
Antti Palosaari | 75c2400 | 2014-12-16 13:54:23 -0300 | [diff] [blame^] | 5 | * Copyright (C) 2012-2014 Antti Palosaari <crope@iki.fi> |
Thomas Mair | 82041c0 | 2012-05-18 14:47:40 -0300 | [diff] [blame] | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or |
| 10 | * (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License along |
| 18 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | */ |
| 21 | |
| 22 | #ifndef RTL2832_H |
| 23 | #define RTL2832_H |
| 24 | |
| 25 | #include <linux/dvb/frontend.h> |
Antti Palosaari | cd559e0 | 2014-12-16 13:37:18 -0300 | [diff] [blame] | 26 | #include <linux/i2c-mux.h> |
Thomas Mair | 82041c0 | 2012-05-18 14:47:40 -0300 | [diff] [blame] | 27 | |
Antti Palosaari | c2c8386 | 2014-12-02 10:55:17 -0300 | [diff] [blame] | 28 | struct rtl2832_platform_data { |
Antti Palosaari | c2c8386 | 2014-12-02 10:55:17 -0300 | [diff] [blame] | 29 | /* |
Antti Palosaari | e1174d7 | 2014-12-13 05:26:27 -0300 | [diff] [blame] | 30 | * Clock frequency. |
| 31 | * Hz |
| 32 | * 4000000, 16000000, 25000000, 28800000 |
| 33 | */ |
| 34 | u32 clk; |
| 35 | |
| 36 | /* |
| 37 | * Tuner. |
Antti Palosaari | cd559e0 | 2014-12-16 13:37:18 -0300 | [diff] [blame] | 38 | * XXX: This list must be kept sync with dvb_usb_rtl28xxu USB IF driver. |
Antti Palosaari | e1174d7 | 2014-12-13 05:26:27 -0300 | [diff] [blame] | 39 | */ |
| 40 | #define RTL2832_TUNER_TUA9001 0x24 |
| 41 | #define RTL2832_TUNER_FC0012 0x26 |
| 42 | #define RTL2832_TUNER_E4000 0x27 |
| 43 | #define RTL2832_TUNER_FC0013 0x29 |
| 44 | #define RTL2832_TUNER_R820T 0x2a |
| 45 | #define RTL2832_TUNER_R828D 0x2b |
| 46 | u8 tuner; |
| 47 | |
| 48 | /* |
| 49 | * Callbacks. |
Antti Palosaari | 6f5f6ee | 2014-12-12 23:16:19 -0300 | [diff] [blame] | 50 | */ |
| 51 | struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *); |
| 52 | struct i2c_adapter* (*get_i2c_adapter)(struct i2c_client *); |
Antti Palosaari | 6f5f6ee | 2014-12-12 23:16:19 -0300 | [diff] [blame] | 53 | int (*enable_slave_ts)(struct i2c_client *); |
Antti Palosaari | 4b01e01 | 2014-12-14 14:07:35 -0300 | [diff] [blame] | 54 | int (*pid_filter)(struct dvb_frontend *, u8, u16, int); |
| 55 | int (*pid_filter_ctrl)(struct dvb_frontend *, int); |
Antti Palosaari | 0aa32ef9 | 2014-12-15 13:34:13 -0300 | [diff] [blame] | 56 | /* Register access for SDR module */ |
| 57 | int (*bulk_read)(struct i2c_client *, unsigned int, void *, size_t); |
| 58 | int (*bulk_write)(struct i2c_client *, unsigned int, const void *, size_t); |
| 59 | int (*update_bits)(struct i2c_client *, unsigned int, unsigned int, unsigned int); |
Antti Palosaari | c2c8386 | 2014-12-02 10:55:17 -0300 | [diff] [blame] | 60 | }; |
| 61 | |
Thomas Mair | 82041c0 | 2012-05-18 14:47:40 -0300 | [diff] [blame] | 62 | #endif /* RTL2832_H */ |