]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - drivers/media/dvb-frontends/rtl2832.h
Merge tag 'pm+acpi-3.11-rc1-more' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mirror_ubuntu-artful-kernel.git] / drivers / media / dvb-frontends / rtl2832.h
CommitLineData
82041c0a
TM
1/*
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
782d8b74 24#include <linux/kconfig.h>
82041c0a
TM
25#include <linux/dvb/frontend.h>
26
27struct rtl2832_config {
28 /*
29 * Demodulator I2C address.
30 */
31 u8 i2c_addr;
32
33 /*
34 * Xtal frequency.
35 * Hz
36 * 4000000, 16000000, 25000000, 28800000
37 */
38 u32 xtal;
39
40 /*
41 * IFs for all used modes.
42 * Hz
43 * 4570000, 4571429, 36000000, 36125000, 36166667, 44000000
44 */
45 u32 if_dvbt;
46
47 /*
832cc7cd
AP
48 * tuner
49 * XXX: This must be keep sync with dvb_usb_rtl28xxu demod driver.
82041c0a 50 */
5db4187a 51#define RTL2832_TUNER_TUA9001 0x24
832cc7cd 52#define RTL2832_TUNER_FC0012 0x26
7e688de0 53#define RTL2832_TUNER_E4000 0x27
832cc7cd 54#define RTL2832_TUNER_FC0013 0x29
fa4bfd2b 55#define RTL2832_TUNER_R820T 0x2a
82041c0a
TM
56 u8 tuner;
57};
58
782d8b74 59#if IS_ENABLED(CONFIG_DVB_RTL2832)
82041c0a
TM
60extern struct dvb_frontend *rtl2832_attach(
61 const struct rtl2832_config *cfg,
62 struct i2c_adapter *i2c
63);
82041c0a
TM
64#else
65static inline struct dvb_frontend *rtl2832_attach(
66 const struct rtl2832_config *config,
67 struct i2c_adapter *i2c
68)
69{
298efdd3 70 pr_warn("%s: driver disabled by Kconfig\n", __func__);
82041c0a
TM
71 return NULL;
72}
73#endif
74
75
76#endif /* RTL2832_H */