diff options
| author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-11 22:05:53 -0200 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-11 22:05:53 -0200 |
| commit | ad3ae53104ecf959f75a4737869697412fa7f2b1 (patch) | |
| tree | 1d54da58a9b1cbdc33b72283ae18deb4acdca898 /linux/drivers/media/dvb | |
| parent | 33a272a323c5b3548dc446cc23f9f7c82d8b14db (diff) | |
| parent | 66f3e98340a34bd0062a84e6b8e2aa84d29c42e3 (diff) | |
| download | mediapointer-dvb-s2-ad3ae53104ecf959f75a4737869697412fa7f2b1.tar.gz mediapointer-dvb-s2-ad3ae53104ecf959f75a4737869697412fa7f2b1.tar.bz2 | |
merge: http://www.linuxtv.org/hg/~stoth/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/dvb')
| -rw-r--r-- | linux/drivers/media/dvb/frontends/s5h1409.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/linux/drivers/media/dvb/frontends/s5h1409.c b/linux/drivers/media/dvb/frontends/s5h1409.c index 29ec9ac8f..3391777e0 100644 --- a/linux/drivers/media/dvb/frontends/s5h1409.c +++ b/linux/drivers/media/dvb/frontends/s5h1409.c @@ -750,6 +750,7 @@ struct dvb_frontend* s5h1409_attach(const struct s5h1409_config* config, struct i2c_adapter* i2c) { struct s5h1409_state* state = NULL; + u16 reg; /* allocate memory for the internal state */ state = kmalloc(sizeof(struct s5h1409_state), GFP_KERNEL); @@ -763,7 +764,8 @@ struct dvb_frontend* s5h1409_attach(const struct s5h1409_config* config, state->if_freq = S5H1409_VSB_IF_FREQ; /* check if the demod exists */ - if (s5h1409_readreg(state, 0x04) != 0x0066) + reg = s5h1409_readreg(state, 0x04); + if ((reg != 0x0066) && (reg != 0x007f)) goto error; /* create dvb_frontend */ @@ -771,19 +773,15 @@ struct dvb_frontend* s5h1409_attach(const struct s5h1409_config* config, sizeof(struct dvb_frontend_ops)); state->frontend.demodulator_priv = state; - /* Note: Leaving the I2C gate open here. */ - s5h1409_writereg(state, 0xf3, 1); - -#if 0 - /* Enable GPIO to disable EZ QAM before - * analog tuners try to calibrate. */ - - s5h1409_set_gpio(fe, 1); + if (s5h1409_init(&state->frontend) != 0) { + printk(KERN_ERR "%s: Failed to initialize correctly\n", + __FUNCTION__); + goto error; + } - or ? + /* Note: Leaving the I2C gate open here. */ + s5h1409_i2c_gate_ctrl(&state->frontend, 1); - s5h1409_set_gpio(fe, state->config->gpio); -#endif return &state->frontend; error: |
