Commit 8117a312 authored by Olli Salonen's avatar Olli Salonen Committed by Mauro Carvalho Chehab

[media] si2168: add support for gapped clock

Add a parameter in si2168_config to support gapped clock. This might be
necessary on some devices with higher bitrates.
Signed-off-by: default avatarOlli Salonen <olli.salonen@iki.fi>
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent b2624ff4
...@@ -508,6 +508,8 @@ static int si2168_init(struct dvb_frontend *fe) ...@@ -508,6 +508,8 @@ static int si2168_init(struct dvb_frontend *fe)
/* set ts mode */ /* set ts mode */
memcpy(cmd.args, "\x14\x00\x01\x10\x10\x00", 6); memcpy(cmd.args, "\x14\x00\x01\x10\x10\x00", 6);
cmd.args[4] |= dev->ts_mode; cmd.args[4] |= dev->ts_mode;
if (dev->ts_clock_gapped)
cmd.args[4] |= 0x40;
cmd.wlen = 6; cmd.wlen = 6;
cmd.rlen = 4; cmd.rlen = 4;
ret = si2168_cmd_execute(client, &cmd); ret = si2168_cmd_execute(client, &cmd);
...@@ -688,6 +690,7 @@ static int si2168_probe(struct i2c_client *client, ...@@ -688,6 +690,7 @@ static int si2168_probe(struct i2c_client *client,
*config->fe = &dev->fe; *config->fe = &dev->fe;
dev->ts_mode = config->ts_mode; dev->ts_mode = config->ts_mode;
dev->ts_clock_inv = config->ts_clock_inv; dev->ts_clock_inv = config->ts_clock_inv;
dev->ts_clock_gapped = config->ts_clock_gapped;
dev->fw_loaded = false; dev->fw_loaded = false;
i2c_set_clientdata(client, dev); i2c_set_clientdata(client, dev);
......
...@@ -42,6 +42,9 @@ struct si2168_config { ...@@ -42,6 +42,9 @@ struct si2168_config {
/* TS clock inverted */ /* TS clock inverted */
bool ts_clock_inv; bool ts_clock_inv;
/* TS clock gapped */
bool ts_clock_gapped;
}; };
#endif #endif
...@@ -38,6 +38,7 @@ struct si2168_dev { ...@@ -38,6 +38,7 @@ struct si2168_dev {
bool fw_loaded; bool fw_loaded;
u8 ts_mode; u8 ts_mode;
bool ts_clock_inv; bool ts_clock_inv;
bool ts_clock_gapped;
}; };
/* firmware command struct */ /* firmware command struct */
......
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