blob: fae78ed785221c782cfa8d95692d419a1d787fbf [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-or-later */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * Realtek RTL2830 DVB-T demodulator driver
4 *
5 * Copyright (C) 2011 Antti Palosaari <crope@iki.fi>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00006 */
7
8#ifndef RTL2830_PRIV_H
9#define RTL2830_PRIV_H
10
11#include <media/dvb_frontend.h>
12#include <media/dvb_math.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
19struct 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
33struct rtl2830_reg_val_mask {
34 u16 reg;
35 u8 val;
36 u8 mask;
37};
38
39#endif /* RTL2830_PRIV_H */