18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Realtek RTL2832 DVB-T demodulator driver
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2012 Thomas Mair <thomas.mair86@gmail.com>
68c2ecf20Sopenharmony_ci * Copyright (C) 2012-2014 Antti Palosaari <crope@iki.fi>
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifndef RTL2832_H
108c2ecf20Sopenharmony_ci#define RTL2832_H
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#include <linux/dvb/frontend.h>
138c2ecf20Sopenharmony_ci#include <linux/i2c-mux.h>
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci/**
168c2ecf20Sopenharmony_ci * struct rtl2832_platform_data - Platform data for the rtl2832 driver
178c2ecf20Sopenharmony_ci * @clk: Clock frequency (4000000, 16000000, 25000000, 28800000).
188c2ecf20Sopenharmony_ci * @tuner: Used tuner model.
198c2ecf20Sopenharmony_ci * @get_dvb_frontend: Get DVB frontend.
208c2ecf20Sopenharmony_ci * @get_i2c_adapter: Get I2C adapter.
218c2ecf20Sopenharmony_ci * @slave_ts_ctrl: Control slave TS interface.
228c2ecf20Sopenharmony_ci * @pid_filter: Set PID to PID filter.
238c2ecf20Sopenharmony_ci * @pid_filter_ctrl: Control PID filter.
248c2ecf20Sopenharmony_ci */
258c2ecf20Sopenharmony_cistruct rtl2832_platform_data {
268c2ecf20Sopenharmony_ci	u32 clk;
278c2ecf20Sopenharmony_ci	/*
288c2ecf20Sopenharmony_ci	 * XXX: This list must be kept sync with dvb_usb_rtl28xxu USB IF driver.
298c2ecf20Sopenharmony_ci	 */
308c2ecf20Sopenharmony_ci#define RTL2832_TUNER_FC2580    0x21
318c2ecf20Sopenharmony_ci#define RTL2832_TUNER_TUA9001   0x24
328c2ecf20Sopenharmony_ci#define RTL2832_TUNER_FC0012    0x26
338c2ecf20Sopenharmony_ci#define RTL2832_TUNER_E4000     0x27
348c2ecf20Sopenharmony_ci#define RTL2832_TUNER_FC0013    0x29
358c2ecf20Sopenharmony_ci#define RTL2832_TUNER_R820T     0x2a
368c2ecf20Sopenharmony_ci#define RTL2832_TUNER_R828D     0x2b
378c2ecf20Sopenharmony_ci#define RTL2832_TUNER_SI2157    0x2c
388c2ecf20Sopenharmony_ci	u8 tuner;
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci	struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *);
418c2ecf20Sopenharmony_ci	struct i2c_adapter* (*get_i2c_adapter)(struct i2c_client *);
428c2ecf20Sopenharmony_ci	int (*slave_ts_ctrl)(struct i2c_client *, bool);
438c2ecf20Sopenharmony_ci	int (*pid_filter)(struct dvb_frontend *, u8, u16, int);
448c2ecf20Sopenharmony_ci	int (*pid_filter_ctrl)(struct dvb_frontend *, int);
458c2ecf20Sopenharmony_ci/* private: Register access for SDR module use only */
468c2ecf20Sopenharmony_ci	struct regmap *regmap;
478c2ecf20Sopenharmony_ci};
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci#endif /* RTL2832_H */
50