summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-11-11 17:40:27 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-11-17 06:43:15 -0200
commit8fdc25bf61cf87280960e9fea453ac86b68fbb35 (patch)
treeb166d319d172889856f9d5aefb32d664738e70de /drivers/media/dvb-frontends
parent8e6c4be3f8f7889b0806d0635c7b85a6328d77ed (diff)
downloadlinux-8fdc25bf61cf87280960e9fea453ac86b68fbb35.tar.bz2
[media] tda666x: add support for set_parms() and get_frequency()
Those two callbacks are the ones that should be used by normal DVB frontend drivers. Add support for them. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r--drivers/media/dvb-frontends/tda665x.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/tda665x.c b/drivers/media/dvb-frontends/tda665x.c
index 9c892533e6a7..6ced688c3264 100644
--- a/drivers/media/dvb-frontends/tda665x.c
+++ b/drivers/media/dvb-frontends/tda665x.c
@@ -88,6 +88,15 @@ static int tda665x_get_state(struct dvb_frontend *fe,
return err;
}
+static int tda665x_get_frequency(struct dvb_frontend *fe, u32 *frequency)
+{
+ struct tda665x_state *state = fe->tuner_priv;
+
+ *frequency = state->frequency;
+
+ return 0;
+}
+
static int tda665x_get_status(struct dvb_frontend *fe, u32 *status)
{
struct tda665x_state *state = fe->tuner_priv;
@@ -201,6 +210,15 @@ exit:
return err;
}
+static int tda665x_set_params(struct dvb_frontend *fe)
+{
+ struct dtv_frontend_properties *c = &fe->dtv_property_cache;
+
+ tda665x_set_frequency(fe, c->frequency);
+
+ return 0;
+}
+
static int tda665x_set_state(struct dvb_frontend *fe,
enum tuner_param param,
struct tuner_state *tstate)
@@ -226,6 +244,8 @@ static struct dvb_tuner_ops tda665x_ops = {
.set_state = tda665x_set_state,
.get_state = tda665x_get_state,
.get_status = tda665x_get_status,
+ .set_params = tda665x_set_params,
+ .get_frequency = tda665x_get_frequency,
.release = tda665x_release
};