aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorSteve Kerrison <steve@stevekerrison.com>2011-08-09 06:16:21 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-03 17:13:41 -0400
commit0db4bf42baae95ddd457b0c4911e851c9169750e (patch)
treed22488cc966eaa498838e91f574d8d65dbe75f35 /drivers/media/video/em28xx
parent6fb2bdfa068676f436fd333c460549ed64549c5e (diff)
[media] CXD2820R: Replace i2c message translation with repeater gate control
This patch implements an i2c_gate_ctrl op for the cxd2820r. Thanks to Robert Schlabbach for identifying the register address and field to set. The old i2c intercept code that prefixed messages with a passthrough byte has been removed and the PCTV nanoStick T2 290e entry in em28xx-dvb has been updated appropriately. Tested for DVB-T2 use; I would appreciate it if somebody with DVB-C capabilities could test it as well - from inspection I cannot see any problems. This is patch v2. It fixes some schoolboy style errors and removes superfluous i2c entries in cxd2820r.h. Signed-off-by: Steve Kerrison <steve@stevekerrison.com> Acked-by: Antti Palosaari <crope@iki.fi> Tested-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r--drivers/media/video/em28xx/em28xx-dvb.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index b3406ebd57d7..b606fc7f842d 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -438,6 +438,7 @@ static struct cxd2820r_config em28xx_cxd2820r_config = {
438 438
439static struct tda18271_config em28xx_cxd2820r_tda18271_config = { 439static struct tda18271_config em28xx_cxd2820r_tda18271_config = {
440 .output_opt = TDA18271_OUTPUT_LT_OFF, 440 .output_opt = TDA18271_OUTPUT_LT_OFF,
441 .gate = TDA18271_GATE_DIGITAL,
441}; 442};
442 443
443/* ------------------------------------------------------------------ */ 444/* ------------------------------------------------------------------ */
@@ -751,11 +752,9 @@ static int em28xx_dvb_init(struct em28xx *dev)
751 dvb->fe[0] = dvb_attach(cxd2820r_attach, 752 dvb->fe[0] = dvb_attach(cxd2820r_attach,
752 &em28xx_cxd2820r_config, &dev->i2c_adap, NULL); 753 &em28xx_cxd2820r_config, &dev->i2c_adap, NULL);
753 if (dvb->fe[0]) { 754 if (dvb->fe[0]) {
754 struct i2c_adapter *i2c_tuner;
755 i2c_tuner = cxd2820r_get_tuner_i2c_adapter(dvb->fe[0]);
756 /* FE 0 attach tuner */ 755 /* FE 0 attach tuner */
757 if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60, 756 if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60,
758 i2c_tuner, &em28xx_cxd2820r_tda18271_config)) { 757 &dev->i2c_adap, &em28xx_cxd2820r_tda18271_config)) {
759 dvb_frontend_detach(dvb->fe[0]); 758 dvb_frontend_detach(dvb->fe[0]);
760 result = -EINVAL; 759 result = -EINVAL;
761 goto out_free; 760 goto out_free;
@@ -766,7 +765,7 @@ static int em28xx_dvb_init(struct em28xx *dev)
766 dvb->fe[1]->id = 1; 765 dvb->fe[1]->id = 1;
767 /* FE 1 attach tuner */ 766 /* FE 1 attach tuner */
768 if (!dvb_attach(tda18271_attach, dvb->fe[1], 0x60, 767 if (!dvb_attach(tda18271_attach, dvb->fe[1], 0x60,
769 i2c_tuner, &em28xx_cxd2820r_tda18271_config)) { 768 &dev->i2c_adap, &em28xx_cxd2820r_tda18271_config)) {
770 dvb_frontend_detach(dvb->fe[1]); 769 dvb_frontend_detach(dvb->fe[1]);
771 /* leave FE 0 still active */ 770 /* leave FE 0 still active */
772 } 771 }