summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-09-14 10:23:20 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-14 10:23:20 -0300
commit3de64fed183d41e17a3a2de86611b84658781f2f (patch)
tree8076250f6af79cc5b2f97f228145abad5a562738
parent0a4f9bdeb8cf961da6d77500e05b5b1a0478dc09 (diff)
downloadmediapointer-dvb-s2-3de64fed183d41e17a3a2de86611b84658781f2f.tar.gz
mediapointer-dvb-s2-3de64fed183d41e17a3a2de86611b84658781f2f.tar.bz2
tm6000: I2C reading operations is not reliable on tm6000
From: Mauro Carvalho Chehab <mchehab@redhat.com> 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. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--linux/drivers/media/common/tuners/tuner-xc2028.c10
-rw-r--r--linux/drivers/media/common/tuners/tuner-xc2028.h1
-rw-r--r--linux/drivers/staging/tm6000/tm6000-cards.c1
3 files changed, 10 insertions, 2 deletions
diff --git a/linux/drivers/media/common/tuners/tuner-xc2028.c b/linux/drivers/media/common/tuners/tuner-xc2028.c
index 307162c4c..c23b00ac3 100644
--- a/linux/drivers/media/common/tuners/tuner-xc2028.c
+++ b/linux/drivers/media/common/tuners/tuner-xc2028.c
@@ -816,8 +816,14 @@ check_device:
/* Check firmware version against what we downloaded. */
if (priv->firm_version != ((version & 0xf0) << 4 | (version & 0x0f))) {
- tuner_err("Incorrect readback of firmware version.\n");
- goto fail;
+ 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. */
diff --git a/linux/drivers/media/common/tuners/tuner-xc2028.h b/linux/drivers/media/common/tuners/tuner-xc2028.h
index e11607181..9778c96a5 100644
--- a/linux/drivers/media/common/tuners/tuner-xc2028.h
+++ b/linux/drivers/media/common/tuners/tuner-xc2028.h
@@ -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;
};
diff --git a/linux/drivers/staging/tm6000/tm6000-cards.c b/linux/drivers/staging/tm6000/tm6000-cards.c
index 714ca2843..2327c12c5 100644
--- a/linux/drivers/staging/tm6000/tm6000-cards.c
+++ b/linux/drivers/staging/tm6000/tm6000-cards.c
@@ -204,6 +204,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;