Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330721
b: refs/heads/master
c: faaf01b
h: refs/heads/master
i:
  330719: 9a548c6
v: v3
  • Loading branch information
Devin Heitmueller authored and Mauro Carvalho Chehab committed Aug 9, 2012
1 parent ce327da commit bb5dc6f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a595c1ce4c9d572cf53513570b9f1a263d7867f2
refs/heads/master: faaf01b2f6be0378c0c6084f0257b150dc014152
16 changes: 13 additions & 3 deletions trunk/drivers/media/video/au0828/au0828-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <linux/io.h>

#include "au0828.h"

#include "media/tuner.h"
#include <media/v4l2-common.h>

static int i2c_scan;
Expand Down Expand Up @@ -147,8 +147,18 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
au0828_write(dev, AU0828_I2C_MULTIBYTE_MODE_2FF, 0x01);

/* Set the I2C clock */
au0828_write(dev, AU0828_I2C_CLK_DIVIDER_202,
dev->board.i2c_clk_divider);
if ((dev->board.tuner_type == TUNER_XC5000) &&
(dev->board.tuner_addr == msg->addr) &&
(msg->len == 64)) {
/* Hack to speed up firmware load. The xc5000 lets us do up
to 400 KHz when in firmware download mode */
au0828_write(dev, AU0828_I2C_CLK_DIVIDER_202,
AU0828_I2C_CLK_250KHZ);
} else {
/* Use the i2c clock speed in the board configuration */
au0828_write(dev, AU0828_I2C_CLK_DIVIDER_202,
dev->board.i2c_clk_divider);
}

/* Hardware needs 8 bit addresses */
au0828_write(dev, AU0828_I2C_DEST_ADDR_203, msg->addr << 1);
Expand Down

0 comments on commit bb5dc6f

Please sign in to comment.