diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-23 12:28:01 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-23 12:28:01 -0300 |
commit | 6bb75de85d2b36b4e02be0e57279e2b7f33c9a38 (patch) | |
tree | 1d2950ebbb455125c9b1d4cbdc8eed569b4df21b /linux/drivers/media/video/cx23885/cx23885-i2c.c | |
parent | 70956da073879dc9f16801892aade7f5762c8dc2 (diff) | |
parent | ff27acca9170876fb942860e461c20285479f627 (diff) | |
download | mediapointer-dvb-s2-6bb75de85d2b36b4e02be0e57279e2b7f33c9a38.tar.gz mediapointer-dvb-s2-6bb75de85d2b36b4e02be0e57279e2b7f33c9a38.tar.bz2 |
merge: http://linuxtv.org/hg/~mkrufky/cx23885
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/cx23885/cx23885-i2c.c')
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-i2c.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx23885/cx23885-i2c.c b/linux/drivers/media/video/cx23885/cx23885-i2c.c index dbecbc232..ba8e27ca9 100644 --- a/linux/drivers/media/video/cx23885/cx23885-i2c.c +++ b/linux/drivers/media/video/cx23885/cx23885-i2c.c @@ -444,6 +444,29 @@ int cx23885_i2c_unregister(struct cx23885_i2c *bus) return 0; } +void cx23885_av_clk(struct cx23885_dev *dev, int enable) +{ + /* write 0 to bus 2 addr 0x144 via i2x_xfer() */ + char buffer[3]; + struct i2c_msg msg; + dprintk(1, "%s(enabled = %d)\n", __func__, enable); + + /* Register 0x144 */ + buffer[0] = 0x01; + buffer[1] = 0x44; + if (enable == 1) + buffer[2] = 0x05; + else + buffer[2] = 0x00; + + msg.addr = 0x44; + msg.flags = I2C_M_TEN; + msg.len = 3; + msg.buf = buffer; + + i2c_xfer(&dev->i2c_bus[2].i2c_adap, &msg, 1); +} + /* ----------------------------------------------------------------------- */ /* |