aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/s5h1411.c
diff options
context:
space:
mode:
authorDevin Heitmueller <devin.heitmueller@gmail.com>2008-10-20 09:33:22 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-21 12:31:06 -0400
commit11fc9a4a440112b5afc1a99d86ba92d70205a688 (patch)
tree1415f3acdd905fde9775372929d39c085215a894 /drivers/media/dvb/frontends/s5h1411.c
parent50eac6bc466f69e1ecb3a1b64346ed7b979547ac (diff)
V4L/DVB (9316): s5h1411: Power down s5h1411 when not in use
Power down the s5h1411 demodulator when not in use (on the Pinnacle 801e, this brings idle power from 123ma down to 84ma). Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Acked-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/s5h1411.c')
-rw-r--r--drivers/media/dvb/frontends/s5h1411.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/s5h1411.c b/drivers/media/dvb/frontends/s5h1411.c
index b9ac6d35a1eb..40644aacffcb 100644
--- a/drivers/media/dvb/frontends/s5h1411.c
+++ b/drivers/media/dvb/frontends/s5h1411.c
@@ -554,7 +554,7 @@ static int s5h1411_set_gpio(struct dvb_frontend *fe, int enable)
554 return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xe0, val); 554 return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xe0, val);
555} 555}
556 556
557static int s5h1411_sleep(struct dvb_frontend *fe, int enable) 557static int s5h1411_set_powerstate(struct dvb_frontend *fe, int enable)
558{ 558{
559 struct s5h1411_state *state = fe->demodulator_priv; 559 struct s5h1411_state *state = fe->demodulator_priv;
560 560
@@ -570,6 +570,11 @@ static int s5h1411_sleep(struct dvb_frontend *fe, int enable)
570 return 0; 570 return 0;
571} 571}
572 572
573static int s5h1411_sleep(struct dvb_frontend *fe)
574{
575 return s5h1411_set_powerstate(fe, 1);
576}
577
573static int s5h1411_register_reset(struct dvb_frontend *fe) 578static int s5h1411_register_reset(struct dvb_frontend *fe)
574{ 579{
575 struct s5h1411_state *state = fe->demodulator_priv; 580 struct s5h1411_state *state = fe->demodulator_priv;
@@ -619,7 +624,7 @@ static int s5h1411_init(struct dvb_frontend *fe)
619 624
620 dprintk("%s()\n", __func__); 625 dprintk("%s()\n", __func__);
621 626
622 s5h1411_sleep(fe, 0); 627 s5h1411_set_powerstate(fe, 0);
623 s5h1411_register_reset(fe); 628 s5h1411_register_reset(fe);
624 629
625 for (i = 0; i < ARRAY_SIZE(init_tab); i++) 630 for (i = 0; i < ARRAY_SIZE(init_tab); i++)
@@ -889,6 +894,7 @@ static struct dvb_frontend_ops s5h1411_ops = {
889 }, 894 },
890 895
891 .init = s5h1411_init, 896 .init = s5h1411_init,
897 .sleep = s5h1411_sleep,
892 .i2c_gate_ctrl = s5h1411_i2c_gate_ctrl, 898 .i2c_gate_ctrl = s5h1411_i2c_gate_ctrl,
893 .set_frontend = s5h1411_set_frontend, 899 .set_frontend = s5h1411_set_frontend,
894 .get_frontend = s5h1411_get_frontend, 900 .get_frontend = s5h1411_get_frontend,