forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/pci/saa7134/saa7134-dvb.c
....@@ -1,19 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 *
34 * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
45 *
56 * Extended 3 / 2005 by Hartmut Hackmann to support various
67 * cards with the tda10046 DVB-T channel decoder
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
178 */
189
1910 #include "saa7134.h"
....@@ -1273,6 +1264,20 @@
12731264 &medion_cardbus,
12741265 &dev->i2c_adap);
12751266 if (fe0->dvb.frontend) {
1267
+ /*
1268
+ * The TV tuner on this board is actually NOT
1269
+ * behind the demod i2c gate.
1270
+ * However, the demod EEPROM is indeed there and it
1271
+ * conflicts with the SAA7134 chip config EEPROM
1272
+ * if the i2c gate is open (since they have same
1273
+ * bus addresses) resulting in card PCI SVID / SSID
1274
+ * being garbage after a reboot from time to time.
1275
+ *
1276
+ * Let's just leave the gate permanently closed -
1277
+ * saa7134_i2c_eeprom_md7134_gate() will close it for
1278
+ * us at probe time if it was open for some reason.
1279
+ */
1280
+ fe0->dvb.frontend->ops.i2c_gate_ctrl = NULL;
12761281 dvb_attach(simple_tuner_attach, fe0->dvb.frontend,
12771282 &dev->i2c_adap, medion_cardbus.tuner_address,
12781283 TUNER_PHILIPS_FMD1216ME_MK3);