From 273b016e692e8c5b5b3bfc26a824d279200f8408 Mon Sep 17 00:00:00 2001 From: Devin Heitmueller Date: Wed, 11 Mar 2009 03:00:41 -0300 Subject: [PATCH] --- yaml --- r: 138201 b: refs/heads/master c: 32c000ad93fe8c447342632024ddef1ca516a0e9 h: refs/heads/master i: 138199: 61be53315f4225c39b2b7384b7805b05bd6711a7 v: v3 --- [refs] | 2 +- trunk/drivers/media/video/au0828/au0828-i2c.c | 22 +++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 75976fa62ad7..144f4e10cfc8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8b2f079523450fa2d65cbb3f8453820bf1e17533 +refs/heads/master: 32c000ad93fe8c447342632024ddef1ca516a0e9 diff --git a/trunk/drivers/media/video/au0828/au0828-i2c.c b/trunk/drivers/media/video/au0828/au0828-i2c.c index d618fbaade1b..ee3e3040d54c 100644 --- a/trunk/drivers/media/video/au0828/au0828-i2c.c +++ b/trunk/drivers/media/video/au0828/au0828-i2c.c @@ -140,7 +140,16 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap, dprintk(4, "%s()\n", __func__); au0828_write(dev, REG_2FF, 0x01); - au0828_write(dev, REG_202, 0x07); + + /* FIXME: There is a problem with i2c communications with xc5000 that + requires us to slow down the i2c clock until we have a better + strategy (such as using the secondary i2c bus to do firmware + loading */ + if ((msg->addr << 1) == 0xc2) { + au0828_write(dev, REG_202, 0x40); + } else { + au0828_write(dev, REG_202, 0x07); + } /* Hardware needs 8 bit addresses */ au0828_write(dev, REG_203, msg->addr << 1); @@ -191,7 +200,16 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap, dprintk(4, "%s()\n", __func__); au0828_write(dev, REG_2FF, 0x01); - au0828_write(dev, REG_202, 0x07); + + /* FIXME: There is a problem with i2c communications with xc5000 that + requires us to slow down the i2c clock until we have a better + strategy (such as using the secondary i2c bus to do firmware + loading */ + if ((msg->addr << 1) == 0xc2) { + au0828_write(dev, REG_202, 0x40); + } else { + au0828_write(dev, REG_202, 0x07); + } /* Hardware needs 8 bit addresses */ au0828_write(dev, REG_203, msg->addr << 1);