diff options
-rw-r--r-- | drivers/media/video/au0828/au0828-i2c.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/media/video/au0828/au0828-i2c.c b/drivers/media/video/au0828/au0828-i2c.c index d618fbaade1b..ee3e3040d54c 100644 --- a/drivers/media/video/au0828/au0828-i2c.c +++ b/drivers/media/video/au0828/au0828-i2c.c | |||
@@ -140,7 +140,16 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap, | |||
140 | dprintk(4, "%s()\n", __func__); | 140 | dprintk(4, "%s()\n", __func__); |
141 | 141 | ||
142 | au0828_write(dev, REG_2FF, 0x01); | 142 | au0828_write(dev, REG_2FF, 0x01); |
143 | au0828_write(dev, REG_202, 0x07); | 143 | |
144 | /* FIXME: There is a problem with i2c communications with xc5000 that | ||
145 | requires us to slow down the i2c clock until we have a better | ||
146 | strategy (such as using the secondary i2c bus to do firmware | ||
147 | loading */ | ||
148 | if ((msg->addr << 1) == 0xc2) { | ||
149 | au0828_write(dev, REG_202, 0x40); | ||
150 | } else { | ||
151 | au0828_write(dev, REG_202, 0x07); | ||
152 | } | ||
144 | 153 | ||
145 | /* Hardware needs 8 bit addresses */ | 154 | /* Hardware needs 8 bit addresses */ |
146 | au0828_write(dev, REG_203, msg->addr << 1); | 155 | au0828_write(dev, REG_203, msg->addr << 1); |
@@ -191,7 +200,16 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap, | |||
191 | dprintk(4, "%s()\n", __func__); | 200 | dprintk(4, "%s()\n", __func__); |
192 | 201 | ||
193 | au0828_write(dev, REG_2FF, 0x01); | 202 | au0828_write(dev, REG_2FF, 0x01); |
194 | au0828_write(dev, REG_202, 0x07); | 203 | |
204 | /* FIXME: There is a problem with i2c communications with xc5000 that | ||
205 | requires us to slow down the i2c clock until we have a better | ||
206 | strategy (such as using the secondary i2c bus to do firmware | ||
207 | loading */ | ||
208 | if ((msg->addr << 1) == 0xc2) { | ||
209 | au0828_write(dev, REG_202, 0x40); | ||
210 | } else { | ||
211 | au0828_write(dev, REG_202, 0x07); | ||
212 | } | ||
195 | 213 | ||
196 | /* Hardware needs 8 bit addresses */ | 214 | /* Hardware needs 8 bit addresses */ |
197 | au0828_write(dev, REG_203, msg->addr << 1); | 215 | au0828_write(dev, REG_203, msg->addr << 1); |