Commit 2d5024a9 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

V4L/DVB (12825): tm6000: I2C reading operations is not reliable on tm6000



tm6000 sometimes can't read from i2c, but this is currently required for
tuner-xc2028 to work.

This patch adds an option to tuner-xc2028 to not rely on i2c reading.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent e5cc2bf4
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -813,8 +813,14 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type,

	/* Check firmware version against what we downloaded. */
	if (priv->firm_version != ((version & 0xf0) << 4 | (version & 0x0f))) {
		if (!priv->ctrl.read_not_reliable) {
			tuner_err("Incorrect readback of firmware version.\n");
			goto fail;
		} else {
			tuner_err("Returned an incorrect version. However, "
				  "read is not reliable enough. Ignoring it.\n");
			hwmodel = 3028;
		}
	}

	/* Check that the tuner hardware model remains consistent over time. */
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ struct xc2028_ctrl {
	unsigned int		vhfbw7:1;
	unsigned int		uhfbw8:1;
	unsigned int		disable_power_mgmt:1;
	unsigned int            read_not_reliable:1;
	unsigned int		demod;
	enum firmware_type	type:2;
};
+1 −0
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@ static void tm6000_config_tuner (struct tm6000_core *dev)
			ctl.fname = "tm6000-xc3028.fw";

		ctl.mts   = 1;
		ctl.read_not_reliable = 1;

		xc2028_cfg.tuner = TUNER_XC2028;
		xc2028_cfg.priv  = &ctl;