blob: 73e2717330658099b83994e1ceb0099dd003f4fb [file] [log] [blame]
Thomas Mair82041c02012-05-18 14:47:40 -03001/*
2 * Realtek RTL2832 DVB-T demodulator driver
3 *
4 * Copyright (C) 2012 Thomas Mair <thomas.mair86@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
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 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef RTL2832_H
22#define RTL2832_H
23
24#include <linux/dvb/frontend.h>
Antti Palosaaricd559e02014-12-16 13:37:18 -030025#include <linux/i2c-mux.h>
Thomas Mair82041c02012-05-18 14:47:40 -030026
Antti Palosaaric2c83862014-12-02 10:55:17 -030027struct rtl2832_platform_data {
Antti Palosaaric2c83862014-12-02 10:55:17 -030028 /*
Antti Palosaarie1174d72014-12-13 05:26:27 -030029 * Clock frequency.
30 * Hz
31 * 4000000, 16000000, 25000000, 28800000
32 */
33 u32 clk;
34
35 /*
36 * Tuner.
Antti Palosaaricd559e02014-12-16 13:37:18 -030037 * XXX: This list must be kept sync with dvb_usb_rtl28xxu USB IF driver.
Antti Palosaarie1174d72014-12-13 05:26:27 -030038 */
39#define RTL2832_TUNER_TUA9001 0x24
40#define RTL2832_TUNER_FC0012 0x26
41#define RTL2832_TUNER_E4000 0x27
42#define RTL2832_TUNER_FC0013 0x29
43#define RTL2832_TUNER_R820T 0x2a
44#define RTL2832_TUNER_R828D 0x2b
45 u8 tuner;
46
47 /*
48 * Callbacks.
Antti Palosaari6f5f6ee2014-12-12 23:16:19 -030049 */
50 struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *);
51 struct i2c_adapter* (*get_i2c_adapter)(struct i2c_client *);
Antti Palosaari6f5f6ee2014-12-12 23:16:19 -030052 int (*enable_slave_ts)(struct i2c_client *);
Antti Palosaari4b01e012014-12-14 14:07:35 -030053 int (*pid_filter)(struct dvb_frontend *, u8, u16, int);
54 int (*pid_filter_ctrl)(struct dvb_frontend *, int);
Antti Palosaari0aa32ef92014-12-15 13:34:13 -030055 /* Register access for SDR module */
56 int (*bulk_read)(struct i2c_client *, unsigned int, void *, size_t);
57 int (*bulk_write)(struct i2c_client *, unsigned int, const void *, size_t);
58 int (*update_bits)(struct i2c_client *, unsigned int, unsigned int, unsigned int);
Antti Palosaaric2c83862014-12-02 10:55:17 -030059};
60
Thomas Mair82041c02012-05-18 14:47:40 -030061#endif /* RTL2832_H */