blob: 8ec4721d79acc75317c6bdba20c145eb183d1888 [file] [log] [blame]
Antti Palosaaric0adca72011-07-08 23:34:09 -03001/*
2 * Realtek RTL2830 DVB-T demodulator driver
3 *
4 * Copyright (C) 2011 Antti Palosaari <crope@iki.fi>
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 *
Antti Palosaaric0adca72011-07-08 23:34:09 -030016 */
17
18#ifndef RTL2830_PRIV_H
19#define RTL2830_PRIV_H
20
21#include "dvb_frontend.h"
Antti Palosaarieba672a2012-05-15 18:32:33 -030022#include "dvb_math.h"
Antti Palosaaric0adca72011-07-08 23:34:09 -030023#include "rtl2830.h"
Antti Palosaari28c08792014-12-07 04:07:29 -030024#include <linux/i2c-mux.h>
Antti Palosaari6dcfe3c2014-12-09 10:48:10 -030025#include <linux/math64.h>
Antti Palosaari15d37f32014-12-12 01:03:51 -030026#include <linux/regmap.h>
Antti Palosaari4a7e4452016-06-29 20:40:56 -030027#include <linux/bitops.h>
Antti Palosaaric0adca72011-07-08 23:34:09 -030028
Antti Palosaarif544f102014-12-08 22:31:28 -030029struct rtl2830_dev {
Antti Palosaarib8cb50d22014-12-09 00:24:13 -030030 struct rtl2830_platform_data *pdata;
Antti Palosaari47b4dbf2014-12-09 06:14:36 -030031 struct i2c_client *client;
Antti Palosaari15d37f32014-12-12 01:03:51 -030032 struct regmap *regmap;
Peter Rosina0119152016-04-20 08:41:13 +020033 struct i2c_mux_core *muxc;
Antti Palosaaric0adca72011-07-08 23:34:09 -030034 struct dvb_frontend fe;
Antti Palosaaria8567cf2012-01-21 22:40:58 -030035 bool sleeping;
Antti Palosaaridf70dda2014-12-09 16:08:44 -030036 unsigned long filters;
Mauro Carvalho Chehab0df289a2015-06-07 14:53:52 -030037 enum fe_status fe_status;
Antti Palosaarif4913912014-12-09 10:27:32 -030038 u64 post_bit_error_prev; /* for old DVBv3 read_ber() calculation */
Antti Palosaari5bb11ca2014-12-09 09:45:16 -030039 u64 post_bit_error;
40 u64 post_bit_count;
Antti Palosaaric0adca72011-07-08 23:34:09 -030041};
42
43struct rtl2830_reg_val_mask {
44 u16 reg;
45 u8 val;
46 u8 mask;
47};
48
49#endif /* RTL2830_PRIV_H */