diff options
author | Chris Pascoe <c.pascoe@itee.uq.edu.au> | 2007-11-19 09:41:20 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:02:31 -0500 |
commit | 45819c381fc4fb342dc091f30eef4b56193e34d5 (patch) | |
tree | c5d2604fd86899672fa8fad4488ff4a725ac5315 | |
parent | 8bf799a6217f6336fb95f37bf1b130003404bd7b (diff) |
V4L/DVB (6648): xc2028: add sleep hook
Add sleep method to enable putting the tuner into standby mode.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/video/tuner-xc2028.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-xc2028.c b/drivers/media/video/tuner-xc2028.c index cc6fa2fa859b..8f9ccaee9bb5 100644 --- a/drivers/media/video/tuner-xc2028.c +++ b/drivers/media/video/tuner-xc2028.c | |||
@@ -929,6 +929,28 @@ static int xc2028_set_params(struct dvb_frontend *fe, | |||
929 | 929 | ||
930 | } | 930 | } |
931 | 931 | ||
932 | static int xc2028_sleep(struct dvb_frontend *fe) | ||
933 | { | ||
934 | struct xc2028_data *priv = fe->tuner_priv; | ||
935 | int rc = 0; | ||
936 | |||
937 | tuner_dbg("%s called\n", __FUNCTION__); | ||
938 | |||
939 | mutex_lock(&priv->lock); | ||
940 | |||
941 | if (priv->firm_version < 0x0202) | ||
942 | rc = send_seq(priv, {0x00, 0x08, 0x00, 0x00}); | ||
943 | else | ||
944 | rc = send_seq(priv, {0x80, 0x08, 0x00, 0x00}); | ||
945 | |||
946 | priv->cur_fw.type = 0; /* need firmware reload */ | ||
947 | |||
948 | mutex_unlock(&priv->lock); | ||
949 | |||
950 | return rc; | ||
951 | } | ||
952 | |||
953 | |||
932 | static int xc2028_dvb_release(struct dvb_frontend *fe) | 954 | static int xc2028_dvb_release(struct dvb_frontend *fe) |
933 | { | 955 | { |
934 | struct xc2028_data *priv = fe->tuner_priv; | 956 | struct xc2028_data *priv = fe->tuner_priv; |
@@ -1009,6 +1031,7 @@ static const struct dvb_tuner_ops xc2028_dvb_tuner_ops = { | |||
1009 | .get_frequency = xc2028_get_frequency, | 1031 | .get_frequency = xc2028_get_frequency, |
1010 | .get_rf_strength = xc2028_signal, | 1032 | .get_rf_strength = xc2028_signal, |
1011 | .set_params = xc2028_set_params, | 1033 | .set_params = xc2028_set_params, |
1034 | .sleep = xc2028_sleep, | ||
1012 | 1035 | ||
1013 | }; | 1036 | }; |
1014 | 1037 | ||