Skip to content

Commit

Permalink
[media] tda18271: make 'low-power standby mode after attach' multi-in…
Browse files Browse the repository at this point in the history
…stance safe

Ensure that unnecessary features are powered down at the end of the
attach() function on attach of the tuner's first instance. If the
configuration requires the loop thru or xtout features, they will
remain enabled.
This must *only* be done after attaching the first instance of the tuner.
If there are multiple instances of the tuner, the bridge driver will need
to maintain power managament by itself.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Oct 1, 2012
1 parent 185e476 commit 4cfae67
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/media/tuners/tda18271-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,10 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
(priv->id == TDA18271HDC2))
tda18271c2_rf_cal_init(fe);

/* enter standby mode, with required output features enabled */
ret = tda18271_toggle_output(fe, 1);
tda_fail(ret);

mutex_unlock(&priv->lock);
break;
default:
Expand Down Expand Up @@ -1323,9 +1327,6 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
if (tda18271_debug & (DBG_MAP | DBG_ADV))
tda18271_dump_std_map(fe);

ret = tda18271_sleep(fe);
tda_fail(ret);

return fe;
fail:
mutex_unlock(&tda18271_list_mutex);
Expand Down

0 comments on commit 4cfae67

Please sign in to comment.