summaryrefslogtreecommitdiff
path: root/drivers/media/tuners/r820t.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-04-10 15:51:45 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-17 04:28:31 +0400
commit84ddc33c20cd026871eb3585ed77badacb0fc113 (patch)
treef78d7318d293b137bb36fa2e2f97eb82193a4a75 /drivers/media/tuners/r820t.c
parent6b8c2308761029868f36d9037377806c63cf06e9 (diff)
downloadlinux-84ddc33c20cd026871eb3585ed77badacb0fc113.tar.xz
[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/tuners/r820t.c')
-rw-r--r--drivers/media/tuners/r820t.c12
1 files changed, 12 insertions, 0 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 {
};
#define VCO_POWER_REF 0x02
+#define DIP_FREQ 32000000
/*
* Static constants
@@ -751,6 +752,17 @@ static int r820t_sysfreq_sel(struct r820t_priv *priv, u32 freq,
break;
}
+ if (priv->cfg->use_diplexer &&
+ ((priv->cfg->rafael_chip == CHIP_R820T) ||
+ (priv->cfg->rafael_chip == CHIP_R828S) ||
+ (priv->cfg->rafael_chip == CHIP_R820C))) {
+ if (freq > DIP_FREQ)
+ air_cable1_in = 0x00;
+ else
+ air_cable1_in = 0x60;
+ cable2_in = 0x00;
+ }
+
rc = r820t_write_reg_mask(priv, 0x1d, lna_top, 0xc7);
if (rc < 0)
return rc;