1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Realtek RTL2830 DVB-T demodulator driver
4  *
5  * Copyright (C) 2011 Antti Palosaari <crope@iki.fi>
6  */
7 
8 #ifndef RTL2830_PRIV_H
9 #define RTL2830_PRIV_H
10 
11 #include <media/dvb_frontend.h>
12 #include <linux/int_log.h>
13 #include "rtl2830.h"
14 #include <linux/i2c-mux.h>
15 #include <linux/math64.h>
16 #include <linux/regmap.h>
17 #include <linux/bitops.h>
18 
19 struct rtl2830_dev {
20 	struct rtl2830_platform_data *pdata;
21 	struct i2c_client *client;
22 	struct regmap *regmap;
23 	struct i2c_mux_core *muxc;
24 	struct dvb_frontend fe;
25 	bool sleeping;
26 	unsigned long filters;
27 	enum fe_status fe_status;
28 	u64 post_bit_error_prev; /* for old DVBv3 read_ber() calculation */
29 	u64 post_bit_error;
30 	u64 post_bit_count;
31 };
32 
33 struct rtl2830_reg_val_mask {
34 	u16 reg;
35 	u8  val;
36 	u8  mask;
37 };
38 
39 #endif /* RTL2830_PRIV_H */
40