Commit 1662070a authored by Patrick Boettcher's avatar Patrick Boettcher Committed by Mauro Carvalho Chehab

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: default avatarPatrick Boettcher <pb@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent aef82207
...@@ -47,6 +47,18 @@ static int flexcop_i2c_read4(struct flexcop_i2c_adapter *i2c, ...@@ -47,6 +47,18 @@ static int flexcop_i2c_read4(struct flexcop_i2c_adapter *i2c,
int len = r100.tw_sm_c_100.total_bytes, /* remember total_bytes is buflen-1 */ int len = r100.tw_sm_c_100.total_bytes, /* remember total_bytes is buflen-1 */
ret; ret;
/* work-around to have CableStar2 and SkyStar2 rev 2.7 work
* correctly:
*
* the ITD1000 is behind an i2c-gate which closes automatically
* after an i2c-transaction the STV0297 needs 2 consecutive reads
* one with no_base_addr = 0 and one with 1
*
* those two work-arounds are conflictin: we check for the card
* type, it is set when probing the ITD1000 */
if (i2c->fc->dev_type == FC_SKY_REV27)
r100.tw_sm_c_100.no_base_addr_ack_error = i2c->no_base_addr;
ret = flexcop_i2c_operation(i2c->fc, &r100); ret = flexcop_i2c_operation(i2c->fc, &r100);
if (ret != 0) { if (ret != 0) {
deb_i2c("Retrying operation\n"); deb_i2c("Retrying operation\n");
......
...@@ -31,7 +31,7 @@ struct itd1000_state { ...@@ -31,7 +31,7 @@ struct itd1000_state {
/* ugly workaround for flexcop's incapable i2c-controller /* ugly workaround for flexcop's incapable i2c-controller
* FIXME, if possible * FIXME, if possible
*/ */
u8 shadow[255]; u8 shadow[256];
}; };
enum itd1000_register { enum itd1000_register {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment