aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-04-10 07:51:45 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-16 20:28:31 -0400
commit84ddc33c20cd026871eb3585ed77badacb0fc113 (patch)
treef78d7318d293b137bb36fa2e2f97eb82193a4a75 /drivers/media
parent6b8c2308761029868f36d9037377806c63cf06e9 (diff)
[media] r820t: add support for diplexer
This is part of the original driver, and adding it doesn't hurt, so add it, to better sync the code. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Tested-by: Antti Palosaari <crope@iki.fi>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/tuners/r820t.c12
-rw-r--r--drivers/media/tuners/r820t.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c
index bb154449a2cf..5be4635c521d 100644
--- a/drivers/media/tuners/r820t.c
+++ b/drivers/media/tuners/r820t.c
@@ -101,6 +101,7 @@ struct r820t_freq_range {
101}; 101};
102 102
103#define VCO_POWER_REF 0x02 103#define VCO_POWER_REF 0x02
104#define DIP_FREQ 32000000
104 105
105/* 106/*
106 * Static constants 107 * Static constants
@@ -751,6 +752,17 @@ static int r820t_sysfreq_sel(struct r820t_priv *priv, u32 freq,
751 break; 752 break;
752 } 753 }
753 754
755 if (priv->cfg->use_diplexer &&
756 ((priv->cfg->rafael_chip == CHIP_R820T) ||
757 (priv->cfg->rafael_chip == CHIP_R828S) ||
758 (priv->cfg->rafael_chip == CHIP_R820C))) {
759 if (freq > DIP_FREQ)
760 air_cable1_in = 0x00;
761 else
762 air_cable1_in = 0x60;
763 cable2_in = 0x00;
764 }
765
754 rc = r820t_write_reg_mask(priv, 0x1d, lna_top, 0xc7); 766 rc = r820t_write_reg_mask(priv, 0x1d, lna_top, 0xc7);
755 if (rc < 0) 767 if (rc < 0)
756 return rc; 768 return rc;
diff --git a/drivers/media/tuners/r820t.h b/drivers/media/tuners/r820t.h
index a64a7b630729..949575a41d49 100644
--- a/drivers/media/tuners/r820t.h
+++ b/drivers/media/tuners/r820t.h
@@ -32,10 +32,10 @@ enum r820t_chip {
32 32
33struct r820t_config { 33struct r820t_config {
34 u8 i2c_addr; /* 0x34 */ 34 u8 i2c_addr; /* 0x34 */
35
36 u32 xtal; 35 u32 xtal;
37 enum r820t_chip rafael_chip; 36 enum r820t_chip rafael_chip;
38 unsigned max_i2c_msg_len; 37 unsigned max_i2c_msg_len;
38 bool use_diplexer;
39}; 39};
40 40
41#if IS_ENABLED(CONFIG_MEDIA_TUNER_R820T) 41#if IS_ENABLED(CONFIG_MEDIA_TUNER_R820T)