xref: /linux/drivers/media/dvb-frontends/rtl2832_sdr.h (revision 26fbb4c8c7c3ee9a4c3b4de555a8587b5a19154e)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Realtek RTL2832U SDR driver
4  *
5  * Copyright (C) 2013 Antti Palosaari <crope@iki.fi>
6  *
7  * GNU Radio plugin "gr-kernel" for device usage will be on:
8  * http://git.linuxtv.org/anttip/gr-kernel.git
9  */
10 
11 #ifndef RTL2832_SDR_H
12 #define RTL2832_SDR_H
13 
14 #include <linux/i2c.h>
15 #include <media/v4l2-subdev.h>
16 #include <media/dvb_frontend.h>
17 
18 /**
19  * struct rtl2832_sdr_platform_data - Platform data for the rtl2832_sdr driver
20  * @clk: Clock frequency (4000000, 16000000, 25000000, 28800000).
21  * @tuner: Used tuner model.
22  * @regmap: pointer to &struct regmap.
23  * @dvb_frontend: rtl2832 DVB frontend.
24  * @v4l2_subdev: Tuner v4l2 controls.
25  * @dvb_usb_device: DVB USB interface for USB streaming.
26  */
27 struct rtl2832_sdr_platform_data {
28 	u32 clk;
29 	/*
30 	 * XXX: This list must be kept sync with dvb_usb_rtl28xxu USB IF driver.
31 	 */
32 #define RTL2832_SDR_TUNER_FC2580    0x21
33 #define RTL2832_SDR_TUNER_TUA9001   0x24
34 #define RTL2832_SDR_TUNER_FC0012    0x26
35 #define RTL2832_SDR_TUNER_E4000     0x27
36 #define RTL2832_SDR_TUNER_FC0013    0x29
37 #define RTL2832_SDR_TUNER_R820T     0x2a
38 #define RTL2832_SDR_TUNER_R828D     0x2b
39 	u8 tuner;
40 
41 	struct regmap *regmap;
42 	struct dvb_frontend *dvb_frontend;
43 	struct v4l2_subdev *v4l2_subdev;
44 	struct dvb_usb_device *dvb_usb_device;
45 };
46 
47 #endif /* RTL2832_SDR_H */
48