Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357242
b: refs/heads/master
c: 43385c8
h: refs/heads/master
v: v3
  • Loading branch information
Igor M. Liplianin authored and Mauro Carvalho Chehab committed Dec 28, 2012
1 parent dbaa656 commit 65bd9a3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 38f7889cea9d5754493fa601a2d466ba33f13f55
refs/heads/master: 43385c8a645a25ddef7a45df8786ff26806f7e5d
12 changes: 12 additions & 0 deletions trunk/drivers/media/dvb-frontends/ds3000.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,9 @@ static int ds3000_read_status(struct dvb_frontend *fe, fe_status_t* status)
return 1;
}

if (state->config->set_lock_led)
state->config->set_lock_led(fe, *status == 0 ? 0 : 1);

dprintk("%s: status = 0x%02x\n", __func__, lock);

return 0;
Expand Down Expand Up @@ -809,6 +812,10 @@ static int ds3000_diseqc_send_burst(struct dvb_frontend *fe,
static void ds3000_release(struct dvb_frontend *fe)
{
struct ds3000_state *state = fe->demodulator_priv;

if (state->config->set_lock_led)
state->config->set_lock_led(fe, 0);

dprintk("%s\n", __func__);
kfree(state);
}
Expand Down Expand Up @@ -1037,6 +1044,11 @@ static int ds3000_tune(struct dvb_frontend *fe,

static enum dvbfe_algo ds3000_get_algo(struct dvb_frontend *fe)
{
struct ds3000_state *state = fe->demodulator_priv;

if (state->config->set_lock_led)
state->config->set_lock_led(fe, 0);

dprintk("%s()\n", __func__);
return DVBFE_ALGO_HW;
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/media/dvb-frontends/ds3000.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ struct ds3000_config {
u8 ci_mode;
/* Set device param to start dma */
int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured);
/* Hook for Lock LED */
void (*set_lock_led)(struct dvb_frontend *fe, int offon);
};

#if defined(CONFIG_DVB_DS3000) || \
Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/media/usb/dvb-usb/dw2102.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,11 @@ static struct ts2020_config dw2104_ts2020_config = {
.tuner_address = 0x60,
};

static struct ds3000_config s660_ds3000_config = {
.demod_address = 0x68,
.set_lock_led = dw210x_led_ctrl,
};

static struct stv0900_config dw2104a_stv0900_config = {
.demod_address = 0x6a,
.demod_mode = 0,
Expand Down Expand Up @@ -1200,7 +1205,7 @@ static int ds3000_frontend_attach(struct dvb_usb_adapter *d)
struct s6x0_state *st = (struct s6x0_state *)d->dev->priv;
u8 obuf[] = {7, 1};

d->fe_adap[0].fe = dvb_attach(ds3000_attach, &dw2104_ds3000_config,
d->fe_adap[0].fe = dvb_attach(ds3000_attach, &s660_ds3000_config,
&d->dev->i2c_adap);

if (d->fe_adap[0].fe == NULL)
Expand Down

0 comments on commit 65bd9a3

Please sign in to comment.