summaryrefslogtreecommitdiff
path: root/drivers/media/tuners/si2157.c
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2014-07-09 18:37:30 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-14 21:07:00 -0300
commita83d7d17ad4c920b9b3f5330521fa346dddd3de3 (patch)
tree5b18d5569ce620cd4d5966cdff303a113c78e1cf /drivers/media/tuners/si2157.c
parent3c0d394ea7022bb9666d9df97a5776c4bcc3045c (diff)
[media] si2157: implement sleep
Implement sleep for power-management. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/tuners/si2157.c')
-rw-r--r--drivers/media/tuners/si2157.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
index 271a752cee54..3f88e5365850 100644
--- a/drivers/media/tuners/si2157.c
+++ b/drivers/media/tuners/si2157.c
@@ -89,12 +89,23 @@ static int si2157_init(struct dvb_frontend *fe)
static int si2157_sleep(struct dvb_frontend *fe)
{
struct si2157 *s = fe->tuner_priv;
+ int ret;
+ struct si2157_cmd cmd;
dev_dbg(&s->client->dev, "%s:\n", __func__);
s->active = false;
+ memcpy(cmd.args, "\x13", 1);
+ cmd.len = 1;
+ ret = si2157_cmd_execute(s, &cmd);
+ if (ret)
+ goto err;
+
return 0;
+err:
+ dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret);
+ return ret;
}
static int si2157_set_params(struct dvb_frontend *fe)