aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2014-07-15 16:34:36 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-21 21:29:06 -0300
commit05024efe1264c3379135d7223f2c84c8f7ef2172 (patch)
tree95fe2803893dc2970f7c9f0efb9cac52de153f0c /drivers
parent[media] em28xx-dvb: Prepare for si2157 driver getting more parameters (diff)
downloadlinux-dev-05024efe1264c3379135d7223f2c84c8f7ef2172.tar.xz
linux-dev-05024efe1264c3379135d7223f2c84c8f7ef2172.zip
[media] si2157: Add support for spectral inversion
This is needed for PCTV 522e support. Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/tuners/si2157.c3
-rw-r--r--drivers/media/tuners/si2157.h5
-rw-r--r--drivers/media/tuners/si2157_priv.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
index 4730f69cac01..f6199832b4cc 100644
--- a/drivers/media/tuners/si2157.c
+++ b/drivers/media/tuners/si2157.c
@@ -253,6 +253,8 @@ static int si2157_set_params(struct dvb_frontend *fe)
memcpy(cmd.args, "\x14\x00\x03\x07\x00\x00", 6);
cmd.args[4] = delivery_system | bandwidth;
+ if (s->inversion)
+ cmd.args[5] = 0x01;
cmd.wlen = 6;
cmd.rlen = 1;
ret = si2157_cmd_execute(s, &cmd);
@@ -307,6 +309,7 @@ static int si2157_probe(struct i2c_client *client,
s->client = client;
s->fe = cfg->fe;
+ s->inversion = cfg->inversion;
mutex_init(&s->i2c_mutex);
/* check if the tuner is there */
diff --git a/drivers/media/tuners/si2157.h b/drivers/media/tuners/si2157.h
index 4465c46baf0e..6da4d5d1c817 100644
--- a/drivers/media/tuners/si2157.h
+++ b/drivers/media/tuners/si2157.h
@@ -29,6 +29,11 @@ struct si2157_config {
* frontend
*/
struct dvb_frontend *fe;
+
+ /*
+ * Spectral Inversion
+ */
+ bool inversion;
};
#endif
diff --git a/drivers/media/tuners/si2157_priv.h b/drivers/media/tuners/si2157_priv.h
index db79f3c40e4c..3ddab5e6b500 100644
--- a/drivers/media/tuners/si2157_priv.h
+++ b/drivers/media/tuners/si2157_priv.h
@@ -26,6 +26,7 @@ struct si2157 {
struct i2c_client *client;
struct dvb_frontend *fe;
bool active;
+ bool inversion;
};
/* firmare command struct */