diff options
author | Oliver Endriss <o.endriss@gmx.de> | 2007-02-13 13:31:07 +0100 |
---|---|---|
committer | Oliver Endriss <o.endriss@gmx.de> | 2007-02-13 13:31:07 +0100 |
commit | cd02f1c774cfec232d5db61834ddf960bcac0713 (patch) | |
tree | 423efd70da500ef2277c6c4a5fbf45b6a39cfde6 /linux/drivers/media/dvb | |
parent | 0173038bafb808d93f88b3f0b043696b04cc2ded (diff) | |
download | mediapointer-dvb-s2-cd02f1c774cfec232d5db61834ddf960bcac0713.tar.gz mediapointer-dvb-s2-cd02f1c774cfec232d5db61834ddf960bcac0713.tar.bz2 |
dvb-ttpci: use i2c gate ctrl from stv0297 frontend driver
From: Marco Schluessler <marco@lordzodiac.de>
Use i2c gate ctrl from stv0297 frontend driver.
Signed-off-by: Marco Schluessler <marco@lordzodiac.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110_v4l.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110_v4l.c b/linux/drivers/media/dvb/ttpci/av7110_v4l.c index 0510a80f2..3795432ad 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_v4l.c +++ b/linux/drivers/media/dvb/ttpci/av7110_v4l.c @@ -141,17 +141,6 @@ static int ves1820_writereg(struct saa7146_dev *dev, u8 addr, u8 reg, u8 data) return 0; } -static int stv0297_writereg(struct saa7146_dev *dev, u8 addr, u8 reg, u8 data) -{ - u8 buf [] = { reg, data }; - struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = buf, .len = 2 }; - - if (1 != saa7146_i2c_transfer(dev, &msg, 1, 1)) - return -1; - return 0; -} - - static int tuner_write(struct saa7146_dev *dev, u8 addr, u8 data [4]) { struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = data, .len = 4 }; @@ -194,6 +183,7 @@ static int ves1820_set_tv_freq(struct saa7146_dev *dev, u32 freq) static int stv0297_set_tv_freq(struct saa7146_dev *dev, u32 freq) { + struct av7110 *av7110 = (struct av7110*)dev->ext_priv; u32 div; u8 data[4]; @@ -214,8 +204,8 @@ static int stv0297_set_tv_freq(struct saa7146_dev *dev, u32 freq) else return -EINVAL; - stv0297_writereg(dev, 0x1C, 0x87, 0x78); - stv0297_writereg(dev, 0x1C, 0x86, 0xc8); + if (av7110->fe->ops.i2c_gate_ctrl) + av7110->fe->ops.i2c_gate_ctrl(av7110->fe, 1); return tuner_write(dev, 0x63, data); } |