Commit 52791979 authored by CrazyCat's avatar CrazyCat Committed by Mauro Carvalho Chehab

[media] si2168: TS clock inversion control

TS clock polarity control implemented.

[Antti: Resolved simple conflict]
Signed-off-by: default avatarEvgeny Plehov <EvgenyPlehov@ukr.net>
Reviewed-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 17ad09f1
...@@ -308,14 +308,16 @@ static int si2168_set_frontend(struct dvb_frontend *fe) ...@@ -308,14 +308,16 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
if (ret) if (ret)
goto err; goto err;
memcpy(cmd.args, "\x14\x00\x09\x10\xe3\x18", 6); memcpy(cmd.args, "\x14\x00\x09\x10\xe3\x08", 6);
cmd.args[5] |= s->ts_clock_inv ? 0x00 : 0x10;
cmd.wlen = 6; cmd.wlen = 6;
cmd.rlen = 4; cmd.rlen = 4;
ret = si2168_cmd_execute(s, &cmd); ret = si2168_cmd_execute(s, &cmd);
if (ret) if (ret)
goto err; goto err;
memcpy(cmd.args, "\x14\x00\x08\x10\xd7\x15", 6); memcpy(cmd.args, "\x14\x00\x08\x10\xd7\x05", 6);
cmd.args[5] |= s->ts_clock_inv ? 0x00 : 0x10;
cmd.wlen = 6; cmd.wlen = 6;
cmd.rlen = 4; cmd.rlen = 4;
ret = si2168_cmd_execute(s, &cmd); ret = si2168_cmd_execute(s, &cmd);
...@@ -669,6 +671,7 @@ static int si2168_probe(struct i2c_client *client, ...@@ -669,6 +671,7 @@ static int si2168_probe(struct i2c_client *client,
*config->i2c_adapter = s->adapter; *config->i2c_adapter = s->adapter;
*config->fe = &s->fe; *config->fe = &s->fe;
s->ts_mode = config->ts_mode; s->ts_mode = config->ts_mode;
s->ts_clock_inv = config->ts_clock_inv;
s->fw_loaded = false; s->fw_loaded = false;
i2c_set_clientdata(client, s); i2c_set_clientdata(client, s);
......
...@@ -37,6 +37,10 @@ struct si2168_config { ...@@ -37,6 +37,10 @@ struct si2168_config {
/* TS mode */ /* TS mode */
u8 ts_mode; u8 ts_mode;
/* TS clock inverted */
bool ts_clock_inv;
}; };
#define SI2168_TS_PARALLEL 0x06 #define SI2168_TS_PARALLEL 0x06
......
...@@ -38,6 +38,7 @@ struct si2168 { ...@@ -38,6 +38,7 @@ struct si2168 {
bool active; bool active;
bool fw_loaded; bool fw_loaded;
u8 ts_mode; u8 ts_mode;
bool ts_clock_inv;
}; };
/* firmare command struct */ /* firmare 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