summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tda8290.c
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <devnull@localhost>2005-08-17 19:42:11 +0000
committerNickolay V. Shmyrev <devnull@localhost>2005-08-17 19:42:11 +0000
commitcad4a4110faf2672fc6dec4d5ca6c09ccac2e3e2 (patch)
tree1603ed1bbfbf74e7dd75c1d8b9a75642dba7d713 /linux/drivers/media/video/tda8290.c
parent5e49ebffdf77e2a1052b3c84d175e707749f532a (diff)
downloadmediapointer-dvb-s2-cad4a4110faf2672fc6dec4d5ca6c09ccac2e3e2.tar.gz
mediapointer-dvb-s2-cad4a4110faf2672fc6dec4d5ca6c09ccac2e3e2.tar.bz2
* cx88-dvb.c: (lgdt330x_pll_set):
* cx88-video.c: (video_release): * mt20xx.c: (microtune_init): * saa7134-video.c: (video_release): * tda8290.c: (standby), (tda8290_init): * tda9887.c: (tda9887_set_tvnorm), (tda9887_configure), (tda9887_command): * tea5767.c: (set_radio_freq), (tea5767_standby), (tea5767_tuner_init): * tuner-core.c: (set_addr), (check_mode), (set_mode), (tuner_command): * tuner-simple.c: (default_tuner_init): * tuner.h: - New tuner standby API.
Diffstat (limited to 'linux/drivers/media/video/tda8290.c')
-rw-r--r--linux/drivers/media/video/tda8290.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/linux/drivers/media/video/tda8290.c b/linux/drivers/media/video/tda8290.c
index c4fb4ecb6..e3340f2d8 100644
--- a/linux/drivers/media/video/tda8290.c
+++ b/linux/drivers/media/video/tda8290.c
@@ -1,5 +1,5 @@
/*
- * $Id: tda8290.c,v 1.16 2005/07/15 21:44:14 mchehab Exp $
+ * $Id: tda8290.c,v 1.17 2005/08/17 19:42:11 nsh Exp $
*
* i2c tv tuner chip device driver
* controls the philips tda8290+75 tuner chip combo.
@@ -10,6 +10,9 @@
#include <linux/delay.h>
#include <media/tuner.h>
+#define I2C_ADDR_TDA8290 0x4b
+#define I2C_ADDR_TDA8275 0x61
+
/* ---------------------------------------------------------------------- */
struct freq_entry {
@@ -76,10 +79,12 @@ static unsigned char i2c_init_tda8275[14] = { 0x00, 0x00, 0x00, 0x00,
static unsigned char i2c_set_VS[2] = { 0x30, 0x6F };
static unsigned char i2c_set_GP01_CF[2] = { 0x20, 0x0B };
static unsigned char i2c_tda8290_reset[2] = { 0x00, 0x00 };
+static unsigned char i2c_tda8290_standby[2] = { 0x00, 0x02 };
static unsigned char i2c_gainset_off[2] = { 0x28, 0x14 };
static unsigned char i2c_gainset_on[2] = { 0x28, 0x54 };
static unsigned char i2c_agc3_00[2] = { 0x80, 0x00 };
static unsigned char i2c_agc2_BF[2] = { 0x60, 0xBF };
+static unsigned char i2c_cb1_D0[2] = { 0x30, 0xD0 };
static unsigned char i2c_cb1_D2[2] = { 0x30, 0xD2 };
static unsigned char i2c_cb1_56[2] = { 0x30, 0x56 };
static unsigned char i2c_cb1_52[2] = { 0x30, 0x52 };
@@ -118,6 +123,13 @@ static struct i2c_msg i2c_msg_epilog[] = {
{ I2C_ADDR_TDA8290, 0, ARRAY_SIZE(i2c_gainset_on), i2c_gainset_on },
};
+static struct i2c_msg i2c_msg_standby[] = {
+ { I2C_ADDR_TDA8290, 0, ARRAY_SIZE(i2c_enable_bridge), i2c_enable_bridge },
+ { I2C_ADDR_TDA8275, 0, ARRAY_SIZE(i2c_cb1_D0), i2c_cb1_D0 },
+ { I2C_ADDR_TDA8290, 0, ARRAY_SIZE(i2c_disable_bridge), i2c_disable_bridge },
+ { I2C_ADDR_TDA8290, 0, ARRAY_SIZE(i2c_tda8290_standby), i2c_tda8290_standby },
+};
+
static int tda8290_tune(struct i2c_client *c)
{
struct tuner *t = i2c_get_clientdata(c);
@@ -206,6 +218,11 @@ static int has_signal(struct i2c_client *c)
return (afc & 0x80)? 65535:0;
}
+static void standby(struct i2c_client *c)
+{
+ i2c_transfer(c->adapter, i2c_msg_standby, ARRAY_SIZE(i2c_msg_standby));
+}
+
int tda8290_init(struct i2c_client *c)
{
struct tuner *t = i2c_get_clientdata(c);
@@ -215,6 +232,7 @@ int tda8290_init(struct i2c_client *c)
t->tv_freq = set_tv_freq;
t->radio_freq = set_radio_freq;
t->has_signal = has_signal;
+ t->standby = standby;
i2c_master_send(c, i2c_enable_bridge, ARRAY_SIZE(i2c_enable_bridge));
i2c_transfer(c->adapter, i2c_msg_init, ARRAY_SIZE(i2c_msg_init));