diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-14 09:23:20 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-17 23:40:06 -0400 |
commit | 2d5024a9e97337874d8d7aa1d6a54ed1c917c5a0 (patch) | |
tree | 33d022a4a27f4d09732381a537b66a98744f4812 | |
parent | e5cc2bf4450fd9739534e690cc16efc140d7b7fc (diff) |
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: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/common/tuners/tuner-xc2028.c | 10 | ||||
-rw-r--r-- | drivers/media/common/tuners/tuner-xc2028.h | 1 | ||||
-rw-r--r-- | drivers/staging/tm6000/tm6000-cards.c | 1 |
3 files changed, 10 insertions, 2 deletions
diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index 8d2907f38a94..53f0fbb33cc6 100644 --- a/drivers/media/common/tuners/tuner-xc2028.c +++ b/drivers/media/common/tuners/tuner-xc2028.c | |||
@@ -813,8 +813,14 @@ check_device: | |||
813 | 813 | ||
814 | /* Check firmware version against what we downloaded. */ | 814 | /* Check firmware version against what we downloaded. */ |
815 | if (priv->firm_version != ((version & 0xf0) << 4 | (version & 0x0f))) { | 815 | if (priv->firm_version != ((version & 0xf0) << 4 | (version & 0x0f))) { |
816 | tuner_err("Incorrect readback of firmware version.\n"); | 816 | if (!priv->ctrl.read_not_reliable) { |
817 | goto fail; | 817 | tuner_err("Incorrect readback of firmware version.\n"); |
818 | goto fail; | ||
819 | } else { | ||
820 | tuner_err("Returned an incorrect version. However, " | ||
821 | "read is not reliable enough. Ignoring it.\n"); | ||
822 | hwmodel = 3028; | ||
823 | } | ||
818 | } | 824 | } |
819 | 825 | ||
820 | /* Check that the tuner hardware model remains consistent over time. */ | 826 | /* Check that the tuner hardware model remains consistent over time. */ |
diff --git a/drivers/media/common/tuners/tuner-xc2028.h b/drivers/media/common/tuners/tuner-xc2028.h index e116071810e0..9778c96a5006 100644 --- a/drivers/media/common/tuners/tuner-xc2028.h +++ b/drivers/media/common/tuners/tuner-xc2028.h | |||
@@ -40,6 +40,7 @@ struct xc2028_ctrl { | |||
40 | unsigned int vhfbw7:1; | 40 | unsigned int vhfbw7:1; |
41 | unsigned int uhfbw8:1; | 41 | unsigned int uhfbw8:1; |
42 | unsigned int disable_power_mgmt:1; | 42 | unsigned int disable_power_mgmt:1; |
43 | unsigned int read_not_reliable:1; | ||
43 | unsigned int demod; | 44 | unsigned int demod; |
44 | enum firmware_type type:2; | 45 | enum firmware_type type:2; |
45 | }; | 46 | }; |
diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index c0bb3ec35480..23f9672d6937 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c | |||
@@ -189,6 +189,7 @@ static void tm6000_config_tuner (struct tm6000_core *dev) | |||
189 | ctl.fname = "tm6000-xc3028.fw"; | 189 | ctl.fname = "tm6000-xc3028.fw"; |
190 | 190 | ||
191 | ctl.mts = 1; | 191 | ctl.mts = 1; |
192 | ctl.read_not_reliable = 1; | ||
192 | 193 | ||
193 | xc2028_cfg.tuner = TUNER_XC2028; | 194 | xc2028_cfg.tuner = TUNER_XC2028; |
194 | xc2028_cfg.priv = &ctl; | 195 | xc2028_cfg.priv = &ctl; |