aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2012-08-06 21:47:10 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-09 19:57:39 -0400
commit21dc61d3c0a4c0ee11e3e4a4e4888d4c71875b6d (patch)
tree7dbb8c954ce612761befc6ed00e828f6898d886a /drivers
parent22d5c6f585352566ab4161d9aa7936100f94af05 (diff)
[media] au0828: tweak workaround for i2c clock stretching bug
The hack I put in a couple of years ago to avoid clock stretching issues when talking to the xc5000 worked fine for writes, but intermittently fails for register reads, because the xc5000 may stretch the clock for longer between bytes (I was seeing cases of 21 us on the analyzer). The problem manifested itself as the xc5000 firmware version and PLL lock register intermittently showing garbage values. Slow down the i2c bus from 30 KHz to 20 KHz to accommodate. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/au0828/au0828-cards.c4
-rw-r--r--drivers/media/video/au0828/au0828-reg.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/video/au0828/au0828-cards.c
index e3fe9a6637f6..448361c6a13e 100644
--- a/drivers/media/video/au0828/au0828-cards.c
+++ b/drivers/media/video/au0828/au0828-cards.c
@@ -46,7 +46,7 @@ struct au0828_board au0828_boards[] = {
46 .name = "Hauppauge HVR850", 46 .name = "Hauppauge HVR850",
47 .tuner_type = TUNER_XC5000, 47 .tuner_type = TUNER_XC5000,
48 .tuner_addr = 0x61, 48 .tuner_addr = 0x61,
49 .i2c_clk_divider = AU0828_I2C_CLK_30KHZ, 49 .i2c_clk_divider = AU0828_I2C_CLK_20KHZ,
50 .input = { 50 .input = {
51 { 51 {
52 .type = AU0828_VMUX_TELEVISION, 52 .type = AU0828_VMUX_TELEVISION,
@@ -77,7 +77,7 @@ struct au0828_board au0828_boards[] = {
77 stretch fits inside of a normal clock cycle, or else the 77 stretch fits inside of a normal clock cycle, or else the
78 au0828 fails to set the STOP bit. A 30 KHz clock puts the 78 au0828 fails to set the STOP bit. A 30 KHz clock puts the
79 clock pulse width at 18us */ 79 clock pulse width at 18us */
80 .i2c_clk_divider = AU0828_I2C_CLK_30KHZ, 80 .i2c_clk_divider = AU0828_I2C_CLK_20KHZ,
81 .input = { 81 .input = {
82 { 82 {
83 .type = AU0828_VMUX_TELEVISION, 83 .type = AU0828_VMUX_TELEVISION,
diff --git a/drivers/media/video/au0828/au0828-reg.h b/drivers/media/video/au0828/au0828-reg.h
index c39f3d2b721e..2140f4cfb645 100644
--- a/drivers/media/video/au0828/au0828-reg.h
+++ b/drivers/media/video/au0828/au0828-reg.h
@@ -63,3 +63,4 @@
63#define AU0828_I2C_CLK_250KHZ 0x07 63#define AU0828_I2C_CLK_250KHZ 0x07
64#define AU0828_I2C_CLK_100KHZ 0x14 64#define AU0828_I2C_CLK_100KHZ 0x14
65#define AU0828_I2C_CLK_30KHZ 0x40 65#define AU0828_I2C_CLK_30KHZ 0x40
66#define AU0828_I2C_CLK_20KHZ 0x60