Commit 03ab1bd5 authored by Daniel Scheller's avatar Daniel Scheller Committed by Mauro Carvalho Chehab

[media] dvb-frontends/cxd2841er: TS_SERIAL config flag

Some constellations work/need a serial TS transport mode. This adds a flag
that will toggle set up of such mode.
Signed-off-by: default avatarDaniel Scheller <d.scheller@gmx.net>
Acked-by: default avatarAbylay Ospan <aospan@netup.ru>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 4b866c4e
...@@ -910,6 +910,18 @@ static void cxd2841er_set_ts_clock_mode(struct cxd2841er_priv *priv, ...@@ -910,6 +910,18 @@ static void cxd2841er_set_ts_clock_mode(struct cxd2841er_priv *priv,
dev_dbg(&priv->i2c->dev, "%s(): ser_ts=0x%02x rate_ctrl_off=0x%02x in_off=0x%02x\n", dev_dbg(&priv->i2c->dev, "%s(): ser_ts=0x%02x rate_ctrl_off=0x%02x in_off=0x%02x\n",
__func__, serial_ts, ts_rate_ctrl_off, ts_in_off); __func__, serial_ts, ts_rate_ctrl_off, ts_in_off);
/*
* slave Bank Addr Bit default Name
* <SLV-T> 00h C4h [1:0] 2'b?? OSERCKMODE
*/
cxd2841er_set_reg_bits(priv, I2C_SLVT, 0xc4,
((priv->flags & CXD2841ER_TS_SERIAL) ? 0x01 : 0x00), 0x03);
/*
* slave Bank Addr Bit default Name
* <SLV-T> 00h D1h [1:0] 2'b?? OSERDUTYMODE
*/
cxd2841er_set_reg_bits(priv, I2C_SLVT, 0xd1,
((priv->flags & CXD2841ER_TS_SERIAL) ? 0x01 : 0x00), 0x03);
/* /*
* slave Bank Addr Bit default Name * slave Bank Addr Bit default Name
* <SLV-T> 00h D9h [7:0] 8'h08 OTSCKPERIOD * <SLV-T> 00h D9h [7:0] 8'h08 OTSCKPERIOD
...@@ -925,7 +937,8 @@ static void cxd2841er_set_ts_clock_mode(struct cxd2841er_priv *priv, ...@@ -925,7 +937,8 @@ static void cxd2841er_set_ts_clock_mode(struct cxd2841er_priv *priv,
* slave Bank Addr Bit default Name * slave Bank Addr Bit default Name
* <SLV-T> 00h 33h [1:0] 2'b01 OREG_CKSEL_TSIF * <SLV-T> 00h 33h [1:0] 2'b01 OREG_CKSEL_TSIF
*/ */
cxd2841er_set_reg_bits(priv, I2C_SLVT, 0x33, 0x00, 0x03); cxd2841er_set_reg_bits(priv, I2C_SLVT, 0x33,
((priv->flags & CXD2841ER_TS_SERIAL) ? 0x01 : 0x00), 0x03);
/* /*
* Enable TS IF Clock * Enable TS IF Clock
* slave Bank Addr Bit default Name * slave Bank Addr Bit default Name
...@@ -3745,7 +3758,8 @@ static int cxd2841er_init_tc(struct dvb_frontend *fe) ...@@ -3745,7 +3758,8 @@ static int cxd2841er_init_tc(struct dvb_frontend *fe)
cxd2841er_write_reg(priv, I2C_SLVT, 0xcd, 0x50); cxd2841er_write_reg(priv, I2C_SLVT, 0xcd, 0x50);
/* SONY_DEMOD_CONFIG_PARALLEL_SEL = 1 */ /* SONY_DEMOD_CONFIG_PARALLEL_SEL = 1 */
cxd2841er_write_reg(priv, I2C_SLVT, 0x00, 0x00); cxd2841er_write_reg(priv, I2C_SLVT, 0x00, 0x00);
cxd2841er_set_reg_bits(priv, I2C_SLVT, 0xc4, 0x00, 0x80); cxd2841er_set_reg_bits(priv, I2C_SLVT, 0xc4,
((priv->flags & CXD2841ER_TS_SERIAL) ? 0x80 : 0x00), 0x80);
cxd2841er_init_stats(fe); cxd2841er_init_stats(fe);
......
...@@ -24,8 +24,9 @@ ...@@ -24,8 +24,9 @@
#include <linux/dvb/frontend.h> #include <linux/dvb/frontend.h>
#define CXD2841ER_USE_GATECTRL 1 #define CXD2841ER_USE_GATECTRL 1 /* bit 0 */
#define CXD2841ER_AUTO_IFHZ 2 #define CXD2841ER_AUTO_IFHZ 2 /* bit 1 */
#define CXD2841ER_TS_SERIAL 4 /* bit 2 */
enum cxd2841er_xtal { enum cxd2841er_xtal {
SONY_XTAL_20500, /* 20.5 MHz */ SONY_XTAL_20500, /* 20.5 MHz */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment