From edb3b432e5bd483b361a5461c744c987a33b999d Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Mon, 24 Apr 2006 22:21:46 -0400 Subject: rename fe_lgh06xf.h to lg_h06xf.h From: Michael Krufky Signed-off-by: Michael Krufky --- linux/drivers/media/dvb/frontends/lg_h06xf.h | 66 ++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 linux/drivers/media/dvb/frontends/lg_h06xf.h (limited to 'linux/drivers/media/dvb/frontends/lg_h06xf.h') diff --git a/linux/drivers/media/dvb/frontends/lg_h06xf.h b/linux/drivers/media/dvb/frontends/lg_h06xf.h new file mode 100644 index 000000000..355a4a498 --- /dev/null +++ b/linux/drivers/media/dvb/frontends/lg_h06xf.h @@ -0,0 +1,66 @@ +/* + * lg_h06xf.h - ATSC Tuner support for LG TDVS-H06xF + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef _LG_H06XF_H_ +#define _LG_H06XF_H_ +#include "dvb-pll.h" + +static int lg_h06xf_pll_set(struct dvb_frontend* fe, struct i2c_adapter* i2c_adap, + struct dvb_frontend_parameters* params) +{ + u8 buf[4]; + struct i2c_msg msg = { .addr = 0x61, .flags = 0, + .buf = buf, .len = sizeof(buf) }; + int err; + + dvb_pll_configure(&dvb_pll_tdvs_tua6034, buf, params->frequency, 0); + if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) { + printk(KERN_WARNING "lg_h06xf: %s error " + "(addr %02x <- %02x, err = %i)\n", + __FUNCTION__, buf[0], buf[1], err); + if (err < 0) + return err; + else + return -EREMOTEIO; + } + + /* Set the Auxiliary Byte. */ +#if 0 + buf[2] &= ~0x20; + buf[2] |= 0x18; + buf[3] = 0x50; +#else + buf[0] = buf[2]; + buf[0] &= ~0x20; + buf[0] |= 0x18; + buf[1] = 0x50; + msg.len = 2; +#endif + if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) { + printk(KERN_WARNING "lg_h06xf: %s error " + "(addr %02x <- %02x, err = %i)\n", + __FUNCTION__, buf[0], buf[1], err); + if (err < 0) + return err; + else + return -EREMOTEIO; + } + + return 0; +} +#endif -- cgit v1.2.3 From 248256f91d487672dd126161381f5364b0b29ce6 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Thu, 27 Apr 2006 00:31:26 -0400 Subject: dvb: rename dvb_pll_tdvs_tua6034 to dvb_pll_lg_tdvs_h06xf From: Michael Krufky Signed-off-by: Michael Krufky --- linux/drivers/media/dvb/frontends/lg_h06xf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/dvb/frontends/lg_h06xf.h') diff --git a/linux/drivers/media/dvb/frontends/lg_h06xf.h b/linux/drivers/media/dvb/frontends/lg_h06xf.h index 355a4a498..6869cbd03 100644 --- a/linux/drivers/media/dvb/frontends/lg_h06xf.h +++ b/linux/drivers/media/dvb/frontends/lg_h06xf.h @@ -28,7 +28,7 @@ static int lg_h06xf_pll_set(struct dvb_frontend* fe, struct i2c_adapter* i2c_ada .buf = buf, .len = sizeof(buf) }; int err; - dvb_pll_configure(&dvb_pll_tdvs_tua6034, buf, params->frequency, 0); + dvb_pll_configure(&dvb_pll_lg_tdvs_h06xf, buf, params->frequency, 0); if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) { printk(KERN_WARNING "lg_h06xf: %s error " "(addr %02x <- %02x, err = %i)\n", -- cgit v1.2.3 From ab12813a48c3dbc4f0d9f2b3e93e7a5465744f9c Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Fri, 28 Apr 2006 01:47:05 +0100 Subject: Add missing pll gate control calls From: Andrew de Quincey I'd missed some of these out, breaking the av7110 tuning. I then checked for more and added them in where necessary. They may not actually be necessary in all these locations, but if not, they'll simply have no effect. Add small delay to stv0299 pll gate control to fix tuning problems. Signed-off-by: Andrew de Quincey --- linux/drivers/media/dvb/frontends/lg_h06xf.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linux/drivers/media/dvb/frontends/lg_h06xf.h') diff --git a/linux/drivers/media/dvb/frontends/lg_h06xf.h b/linux/drivers/media/dvb/frontends/lg_h06xf.h index 6869cbd03..21acb5bad 100644 --- a/linux/drivers/media/dvb/frontends/lg_h06xf.h +++ b/linux/drivers/media/dvb/frontends/lg_h06xf.h @@ -29,6 +29,8 @@ static int lg_h06xf_pll_set(struct dvb_frontend* fe, struct i2c_adapter* i2c_ada int err; dvb_pll_configure(&dvb_pll_lg_tdvs_h06xf, buf, params->frequency, 0); + if (fe->ops->i2c_gate_ctrl) + fe->ops->i2c_gate_ctrl(fe, 1); if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) { printk(KERN_WARNING "lg_h06xf: %s error " "(addr %02x <- %02x, err = %i)\n", @@ -51,6 +53,8 @@ static int lg_h06xf_pll_set(struct dvb_frontend* fe, struct i2c_adapter* i2c_ada buf[1] = 0x50; msg.len = 2; #endif + if (fe->ops->i2c_gate_ctrl) + fe->ops->i2c_gate_ctrl(fe, 1); if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) { printk(KERN_WARNING "lg_h06xf: %s error " "(addr %02x <- %02x, err = %i)\n", -- cgit v1.2.3