Antti Palosaari | c0adca7 | 2011-07-08 23:34:09 -0300 | [diff] [blame] | 1 | /* |
| 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 Palosaari | c0adca7 | 2011-07-08 23:34:09 -0300 | [diff] [blame] | 16 | */ |
| 17 | |
| 18 | #ifndef RTL2830_PRIV_H |
| 19 | #define RTL2830_PRIV_H |
| 20 | |
| 21 | #include "dvb_frontend.h" |
Antti Palosaari | eba672a | 2012-05-15 18:32:33 -0300 | [diff] [blame] | 22 | #include "dvb_math.h" |
Antti Palosaari | c0adca7 | 2011-07-08 23:34:09 -0300 | [diff] [blame] | 23 | #include "rtl2830.h" |
Antti Palosaari | 28c0879 | 2014-12-07 04:07:29 -0300 | [diff] [blame] | 24 | #include <linux/i2c-mux.h> |
Antti Palosaari | 6dcfe3c | 2014-12-09 10:48:10 -0300 | [diff] [blame] | 25 | #include <linux/math64.h> |
Antti Palosaari | 15d37f3 | 2014-12-12 01:03:51 -0300 | [diff] [blame] | 26 | #include <linux/regmap.h> |
Antti Palosaari | 4a7e445 | 2016-06-29 20:40:56 -0300 | [diff] [blame] | 27 | #include <linux/bitops.h> |
Antti Palosaari | c0adca7 | 2011-07-08 23:34:09 -0300 | [diff] [blame] | 28 | |
Antti Palosaari | f544f10 | 2014-12-08 22:31:28 -0300 | [diff] [blame] | 29 | struct rtl2830_dev { |
Antti Palosaari | b8cb50d2 | 2014-12-09 00:24:13 -0300 | [diff] [blame] | 30 | struct rtl2830_platform_data *pdata; |
Antti Palosaari | 47b4dbf | 2014-12-09 06:14:36 -0300 | [diff] [blame] | 31 | struct i2c_client *client; |
Antti Palosaari | 15d37f3 | 2014-12-12 01:03:51 -0300 | [diff] [blame] | 32 | struct regmap *regmap; |
Peter Rosin | a011915 | 2016-04-20 08:41:13 +0200 | [diff] [blame] | 33 | struct i2c_mux_core *muxc; |
Antti Palosaari | c0adca7 | 2011-07-08 23:34:09 -0300 | [diff] [blame] | 34 | struct dvb_frontend fe; |
Antti Palosaari | a8567cf | 2012-01-21 22:40:58 -0300 | [diff] [blame] | 35 | bool sleeping; |
Antti Palosaari | df70dda | 2014-12-09 16:08:44 -0300 | [diff] [blame] | 36 | unsigned long filters; |
Mauro Carvalho Chehab | 0df289a | 2015-06-07 14:53:52 -0300 | [diff] [blame] | 37 | enum fe_status fe_status; |
Antti Palosaari | f491391 | 2014-12-09 10:27:32 -0300 | [diff] [blame] | 38 | u64 post_bit_error_prev; /* for old DVBv3 read_ber() calculation */ |
Antti Palosaari | 5bb11ca | 2014-12-09 09:45:16 -0300 | [diff] [blame] | 39 | u64 post_bit_error; |
| 40 | u64 post_bit_count; |
Antti Palosaari | c0adca7 | 2011-07-08 23:34:09 -0300 | [diff] [blame] | 41 | }; |
| 42 | |
| 43 | struct rtl2830_reg_val_mask { |
| 44 | u16 reg; |
| 45 | u8 val; |
| 46 | u8 mask; |
| 47 | }; |
| 48 | |
| 49 | #endif /* RTL2830_PRIV_H */ |