2 * Montage M88DS3103 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/math64.h>
27 #define M88DS3103_FIRMWARE "dvb-demod-m88ds3103.fw"
28 #define M88RS6000_FIRMWARE "dvb-demod-m88rs6000.fw"
29 #define M88DS3103_MCLK_KHZ 96000
30 #define M88RS6000_CHIP_ID 0x74
31 #define M88DS3103_CHIP_ID 0x70
33 struct m88ds3103_priv
{
34 struct i2c_adapter
*i2c
;
35 /* mutex needed due to own tuner I2C adapter */
36 struct mutex i2c_mutex
;
37 const struct m88ds3103_config
*cfg
;
38 struct dvb_frontend fe
;
39 fe_delivery_system_t delivery_system
;
40 fe_status_t fe_status
;
41 u32 dvbv3_ber
; /* for old DVBv3 API read_ber */
42 bool warm
; /* FW running */
43 struct i2c_adapter
*i2c_adapter
;
44 /* auto detect chip id to do different config */
46 /* main mclk is calculated for M88RS6000 dynamically */
52 struct m88ds3103_reg_val
{
57 static const struct m88ds3103_reg_val m88ds3103_dvbs_init_reg_vals
[] = {
140 static const struct m88ds3103_reg_val m88ds3103_dvbs2_init_reg_vals
[] = {
226 static const struct m88ds3103_reg_val m88rs6000_dvbs_init_reg_vals
[] = {
312 static const struct m88ds3103_reg_val m88rs6000_dvbs2_init_reg_vals
[] = {