hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/media/dvb-frontends/m88ds3103_priv.h
....@@ -1,17 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Montage Technology M88DS3103/M88RS6000 demodulator driver
34 *
45 * Copyright (C) 2013 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.
156 */
167
178 #ifndef M88DS3103_PRIV_H
....@@ -25,13 +16,20 @@
2516 #include <linux/regmap.h>
2617 #include <linux/math64.h>
2718
28
-#define M88DS3103_FIRMWARE "dvb-demod-m88ds3103.fw"
29
-#define M88RS6000_FIRMWARE "dvb-demod-m88rs6000.fw"
19
+#define M88DS3103B_FIRMWARE "dvb-demod-m88ds3103b.fw"
20
+#define M88DS3103_FIRMWARE "dvb-demod-m88ds3103.fw"
21
+#define M88RS6000_FIRMWARE "dvb-demod-m88rs6000.fw"
22
+
3023 #define M88RS6000_CHIP_ID 0x74
3124 #define M88DS3103_CHIP_ID 0x70
3225
26
+#define M88DS3103_CHIPTYPE_3103 0
27
+#define M88DS3103_CHIPTYPE_RS6000 1
28
+#define M88DS3103_CHIPTYPE_3103B 2
29
+
3330 struct m88ds3103_dev {
3431 struct i2c_client *client;
32
+ struct i2c_client *dt_client;
3533 struct regmap_config regmap_config;
3634 struct regmap *regmap;
3735 struct m88ds3103_config config;
....@@ -44,10 +42,13 @@
4442 struct i2c_mux_core *muxc;
4543 /* auto detect chip id to do different config */
4644 u8 chip_id;
45
+ /* chip type to differentiate m88rs6000 from m88ds3103b */
46
+ u8 chiptype;
4747 /* main mclk is calculated for M88RS6000 dynamically */
4848 s32 mclk;
4949 u64 post_bit_error;
5050 u64 post_bit_count;
51
+ u8 dt_addr;
5152 };
5253
5354 struct m88ds3103_reg_val {