2 * Montage Technology M88DS3103/M88RS6000 demodulator driver
4 * Copyright (C) 2013 Antti Palosaari <crope@iki.fi>
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.
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.
17 #ifndef M88DS3103_PRIV_H
18 #define M88DS3103_PRIV_H
20 #include "dvb_frontend.h"
21 #include "m88ds3103.h"
23 #include <linux/firmware.h>
24 #include <linux/i2c-mux.h>
25 #include <linux/regmap.h>
26 #include <linux/math64.h>
28 #define M88DS3103_FIRMWARE "dvb-demod-m88ds3103.fw"
29 #define M88RS6000_FIRMWARE "dvb-demod-m88rs6000.fw"
30 #define M88RS6000_CHIP_ID 0x74
31 #define M88DS3103_CHIP_ID 0x70
33 struct m88ds3103_dev
{
34 struct i2c_client
*client
;
35 struct regmap_config regmap_config
;
36 struct regmap
*regmap
;
37 struct m88ds3103_config config
;
38 const struct m88ds3103_config
*cfg
;
39 struct dvb_frontend fe
;
40 enum fe_delivery_system delivery_system
;
41 enum fe_status fe_status
;
42 u32 dvbv3_ber
; /* for old DVBv3 API read_ber */
43 bool warm
; /* FW running */
44 struct i2c_mux_core
*muxc
;
45 /* auto detect chip id to do different config */
47 /* main mclk is calculated for M88RS6000 dynamically */
53 struct m88ds3103_reg_val
{
58 static const struct m88ds3103_reg_val m88ds3103_dvbs_init_reg_vals
[] = {
141 static const struct m88ds3103_reg_val m88ds3103_dvbs2_init_reg_vals
[] = {
227 static const struct m88ds3103_reg_val m88rs6000_dvbs_init_reg_vals
[] = {
313 static const struct m88ds3103_reg_val m88rs6000_dvbs2_init_reg_vals
[] = {