1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Montage Technology M88DS3103/M88RS6000 demodulator driver
5 * Copyright (C) 2013 Antti Palosaari <crope@iki.fi>
8 #ifndef M88DS3103_PRIV_H
9 #define M88DS3103_PRIV_H
11 #include <media/dvb_frontend.h>
12 #include "m88ds3103.h"
13 #include <media/dvb_math.h>
14 #include <linux/firmware.h>
15 #include <linux/i2c-mux.h>
16 #include <linux/regmap.h>
17 #include <linux/math64.h>
19 #define M88DS3103_FIRMWARE "dvb-demod-m88ds3103.fw"
20 #define M88RS6000_FIRMWARE "dvb-demod-m88rs6000.fw"
21 #define M88RS6000_CHIP_ID 0x74
22 #define M88DS3103_CHIP_ID 0x70
24 struct m88ds3103_dev
{
25 struct i2c_client
*client
;
26 struct regmap_config regmap_config
;
27 struct regmap
*regmap
;
28 struct m88ds3103_config config
;
29 const struct m88ds3103_config
*cfg
;
30 struct dvb_frontend fe
;
31 enum fe_delivery_system delivery_system
;
32 enum fe_status fe_status
;
33 u32 dvbv3_ber
; /* for old DVBv3 API read_ber */
34 bool warm
; /* FW running */
35 struct i2c_mux_core
*muxc
;
36 /* auto detect chip id to do different config */
38 /* main mclk is calculated for M88RS6000 dynamically */
44 struct m88ds3103_reg_val
{
49 static const struct m88ds3103_reg_val m88ds3103_dvbs_init_reg_vals
[] = {
132 static const struct m88ds3103_reg_val m88ds3103_dvbs2_init_reg_vals
[] = {
218 static const struct m88ds3103_reg_val m88rs6000_dvbs_init_reg_vals
[] = {
304 static const struct m88ds3103_reg_val m88rs6000_dvbs2_init_reg_vals
[] = {