aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2009-02-28 08:19:30 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:47 -0400
commit1662070a593b5a862b5bf8c843ebfab0deb058a6 (patch)
treee6636c48e4503ef8b6069c09a77285f2666055b7 /drivers
parentaef822074b88397968560b650a9f4bdbf973e2b3 (diff)
V4L/DVB (11284): Fix i2c code of flexcop-driver for rare revisions
This patch adds a workaround in the i2c-code of the flexcop-driver to fix support for SkyStar2 rev 2.7. There are not many devices out there, that's why this bug was not revealed earlier. Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/b2c2/flexcop-i2c.c12
-rw-r--r--drivers/media/dvb/frontends/itd1000_priv.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-i2c.c b/drivers/media/dvb/b2c2/flexcop-i2c.c
index f13783f08f0f..a0cfde18e640 100644
--- a/drivers/media/dvb/b2c2/flexcop-i2c.c
+++ b/drivers/media/dvb/b2c2/flexcop-i2c.c
@@ -47,6 +47,18 @@ static int flexcop_i2c_read4(struct flexcop_i2c_adapter *i2c,
47 int len = r100.tw_sm_c_100.total_bytes, /* remember total_bytes is buflen-1 */ 47 int len = r100.tw_sm_c_100.total_bytes, /* remember total_bytes is buflen-1 */
48 ret; 48 ret;
49 49
50 /* work-around to have CableStar2 and SkyStar2 rev 2.7 work
51 * correctly:
52 *
53 * the ITD1000 is behind an i2c-gate which closes automatically
54 * after an i2c-transaction the STV0297 needs 2 consecutive reads
55 * one with no_base_addr = 0 and one with 1
56 *
57 * those two work-arounds are conflictin: we check for the card
58 * type, it is set when probing the ITD1000 */
59 if (i2c->fc->dev_type == FC_SKY_REV27)
60 r100.tw_sm_c_100.no_base_addr_ack_error = i2c->no_base_addr;
61
50 ret = flexcop_i2c_operation(i2c->fc, &r100); 62 ret = flexcop_i2c_operation(i2c->fc, &r100);
51 if (ret != 0) { 63 if (ret != 0) {
52 deb_i2c("Retrying operation\n"); 64 deb_i2c("Retrying operation\n");
diff --git a/drivers/media/dvb/frontends/itd1000_priv.h b/drivers/media/dvb/frontends/itd1000_priv.h
index 8cdc54e57903..08ca851223c9 100644
--- a/drivers/media/dvb/frontends/itd1000_priv.h
+++ b/drivers/media/dvb/frontends/itd1000_priv.h
@@ -31,7 +31,7 @@ struct itd1000_state {
31 /* ugly workaround for flexcop's incapable i2c-controller 31 /* ugly workaround for flexcop's incapable i2c-controller
32 * FIXME, if possible 32 * FIXME, if possible
33 */ 33 */
34 u8 shadow[255]; 34 u8 shadow[256];
35}; 35};
36 36
37enum itd1000_register { 37enum itd1000_register {